Anki 2.1.30 automatically created thousands of unwanted cards

I updated my Anki to the new 2.1.30 version (Windows 64 bit). When I clicked on “Stats”, I got a message something like that there are errors in my Database and I should click on “Check Database”. So I went to Tools – Check Database and as a result of the “fix”, the program created thousands of unwanted cards for me. Essentially, it looks like these new cards are reverse cards of the “optional reversed card” type for those of my cards where I left the “Add Reverse” field empty. In addition, these newly created cards appear as empty but the “Empty Cards” function does not recognize them as such. How can I get rid of these unwanted cards and get back to normal? Thanks!

You have {{type:Front}} outside of {{#Add Reverse}}…{{/Add reverse}} - you will need to move it inside it so that nothing is generated if Add Reverse is empty.