I have out-of-state losses that are triple the gains. I entered this in Federal, and when I enter this in state, the taxes I owe the state increase. Is this correct?

The gains and losses are from a rental property in another state. When I enter the income in the resident state entry for out-of-state income, my refund for that state INCREASES. Then, when I enter the losses it goes the other way and I owe the resident state money. This seems backwards to me. Is this correct and why?