2018 arizona amended return pulled incorrect refund amount

2018 Arizona amended return pulled incorrect refund amount. I had a $1906 refund amount on my state taxes with original file. Upon realizing some missed stock information, and setting up an amendment, I saw I was owed $89 in refund and sent it off. Now the state sent me back a letter saying I owed them $37. In looking at the lines more carefully, line 46 states the incorrect refund amount of $1783 from the original return. WTH. All the software had to do was port over my refund amount. Where the heck did this random value come from? Now I owe the state when I thought I was getting a refund. Thanks for the extra work and headaches. Where do I go to complain to TT About this? Are there any guarantees around this? Any impact to them? OR do they get to release a crappy product with no repercussions?