Reciprocal state issues . . . question below . . .

My permanent residence was Illinois, but I worked in Wisconsin part of the year, which is a reciprocal state. However, I have a W2 for both Illinois and Wisconsin showing income in both states and state taxes were withheld for both states. Will I have to file state income tax returns for both states? When I complete both state tax forms, I owe Illinois a good deal of money. What am I doing wrong?"