Engine idle issues

Hey guys, I drive a 1999 Kia Sportage with 84,000 miles on it and recently the engine has been running rather odd. When I start the car, sometimes the engine will rev really high up to like 3000 rpm until I put it in reverse or drive. Also, lately when I am in drive and I stop, or slow down so it drops below 1000 rpm the engine will kind of rev down to 500 and then back to 1000. This causes the engine to kind of shake and has once caused it to shut off. Now I put it in neutral when I stop. Does anyone know what it could be? Thanks for any help

The problem might be with a defective Idle Air Control valve.


The IAC valve controls the engine idle speed under all conditions. You can try starting the engine, and while the engine is idling take the handle of a screwdriver and tap on the IAC valve. If doing this causes the engine idle speed to change replace the IAC valve.


I haven’t had a chance to do this yet, but a couple of days ago the check engine light came on, so I went to O’Reilly and the code was p0101 which is mass or volume air flow circuit range/performance. The employee told me the mass air flow sensor was most likely dirty so he told me to buy a can of cleaner and clean the sensor. I did that and still had problems, and today the light came on again, so I went back in and it was the same code. I reset the computer so it would clear the code, but could this issue be related to the idle issues?