I just changed out the thermostat in a 03 Grand Prix 3100. When I put it back together it was chugging and dying. I took apart the intake and throttle body and cleaned the crap out of it with intake cleaner. The car no longer dies but it revs randomly and the RPMs will stick at a certain point like 3k or 4k and jump around. The car does this normally and when sensor number 4 from the picture is unplugged (i'm assuming its the throttle position sensor) and also when number 3 is unplugged (i'm assuming its the mass airflow sensor). Anyone know what the problem could be. Also if you could explain the numbered sensors in the picture it would help.
No need to clean it, it'* a potentiometer, so nothing to clean. But you may want to test it. Something tells me it'* not working right. I asked if you had removed it because if it'* put back on wrong it wont give the correct signals. Also check for any vacuum leaks, make sure none of the sensors are disconnected.