Part year resident and tax credit

I am filing a part year resident in AZ and MA.  I moved to MA half way through the year but the company I work for is in AZ.  I work remotely from MA.  The AZ company deducted all of state taxes for AZ for the whole year.  I did not pay any MA taxes.  Turbotax software, I did the AZ tax first and am getting a refund for 500 dollars.  Now when I do the MA taxes and take the credit it finishes with me only paying MA 200.00.  This seems incorrect since my mass liability is 700.  I did not pay any massachusetts tax.  Should I not be taking the credit? Does the Arizona refund go to the state automatically?  It is not clear in the software.