529 Confusion

I have a college student who earned $5,700 last year. He is listed as the recipient on a 1099-Q. $1,603 in earnings from the 529 is on his return as other income. 

 

This switched him from a refund of $242 to owing $49. I thought distributions from 529 were tax free as long as they were used for qualified expenses. 

 

Would it have been better if I were the beneficiary?