Hi, yes that's correct.
When filing state taxes, MOST states have a credit for taxes paid to another state.
This is what keeps you from being taxed twice, on the same income, at the state level
Here's the guidance from Massachusetts Dept. of Revenue: http://www.mass.gov/dor/individuals/filing-and-payment-information/guide-to-personal-income-tax/credits/income-tax-paid-to-another-jurisdiction-credit.html
Let me know if you have further questions