Refunds were due to pro-rated room
You can return the refunded amounts to the 529 Account within 60 days thus eliminating the potential tax.
When you enter the 1099-Q, the TurboTax program will ask if any amount was returned within the 60 day window.