529 and distribution in lieu of scholarship. TT calcs don't seem to add up.

If I understand it, the part of a 529 earnings distribution withdrawn that is in lieu of a scholarship received by my dependent son has to be claimed as income if it isn't used for educational expenses, but there is no penalty on it.  I can't figure a way to make turbotax do this correctly.  I've entered my 1099-T and 1099-Q related to this account but the numbers don't add up.  It should be this simple:

1099-Q

Box 1: $13583

Box 2: $8006

1098-T

Box 1: $27166 (total received by college, including scholarships)

Box 6: $14000 (total scholarships received)

 

$7000 of 1099-Q Box 1's were distributed to me in lieu of scholarship

 

Amount to add to income should be:

Scholarship/Total Distribution = Scholarship ratio

Earnings attributed to scholarship = Earnings * Scholarship Ratio

7000/13583 = 0.515

Earnings Adjustment = 8006 * 0.515 = $4123

However, Turbotax only adds $2943 on line 8 schedule 1

 

It's interesting, when entering the 1099-R , Turbotax never asks me if all or part of the distribution was used to pay for tuition for my dependent.