Final withdrawal from 529 account

My daughter (no longer a dependent) finished graduate school this year.  We withdrew the remaining funds from her 529 account (I am the owner).  The amount withdrawn was much more than her current year's expenses.  During her undergraduate years, she received substantial scholarships.  We did not withdraw from the 529 account at that time because we knew that we would need the money to pay for graduate school.  The total amount of the expenses actually paid plus the scholarships over the years far exceeded the amount that we withdrew.  By withdrawing in the current year, TurboTax now calculates that I have to pay taxes on the earnings on the withdrawals plus a 10% penalty.  It is my understanding that we should not have to pay a penalty on amounts withdrawn because of the receipt of scholarships.  Is there any way around this?  If so, how do I accomplish this in Turbo Tax?