Primary residence converted to rental mid year-Mortgage interest deduction

Hi

 

I converted my first home primary residence to rental in June 2021 (loan 600k). I purchased a second home in April 2021 (loan 1.2 M)  and used it as primary residence. I manually split and entered mortgage interest deduction and property taxes on schedule E and Schedule A based on the time I used first home as primary vs rental. However, when I look at mortgage interest deduction worksheet, it is calculating the average loan balance incorrectly. It is adding principal balance on both first and second home and reporting average balance as 1.8 M, since this is > 750K, it is limiting my total deduction. This is not correct as I only used first home as primary for 4 months, converted to rental and then used a second home as residence. I am getting less deduction because of this. How do I fix my balance and this error?