Amending Tax Returns from Single to Married to NRA - resolved, please delete.

Please help me! I am desperate!

I have been a US resident married to a non-resident since 2017, I had been filing as Single because I did not know I was able/supposed to get a Taxpayer Number for my spouse. in 2019 he was approved for a visa but did not enter the US and obtain a SSN until this year (2021).

I contacted the IRS by phone and asked what to do, and the agent said that since he now has a SSN, I should file amendements for previous years and use his (newly obtained) SSN. I want second opinions, is that ok to do? knowing that he DID NOT have an ITIN or an SSN when I filed the original returns. 

Thank you so much for your help!