Problem with PA-40 calculations

I am a NJ resident who owns a small business and does some work in Pennsylvania.

 

I'm trying to apportion my Schedule C income for form PA-40, using Schedule NRH. But the calculations are coming out wrong. Instead of taking the amount of income I earned in PA and moving forward with that, the software is adding that to my entire profits for the year and wanting me to pay tax on that in PA. But only a small amount of income (and therefore tax) is related to PA. Most of is was earned in NJ, my state of residence.

 

Is this a software error? Or what have I done wrong?