It sounds like this calculation is working as it should. Your federal adjusted gross income -- even income earned in another state -- transfers over to your Montana return.
According to Montana Taxable Income Calculation in the Instructions for Form 2:
Taxpayers will use their federal taxable income as the base for calculating their Montana taxable income. Montana's current system uses the federal adjusted gross income as the base for determining Montana taxable income.
Your Montana tax is then prorated, based on the ratio of your Montana-source income to Montana adjusted gross income. See Nonresident Tax in the link above for more information.