2003 Explorer Sport rough running on occasion

My wifes SUV had a vacuum leak at the rubber fitting just off the PCV valve. I have replace the rubber connector and reset the lean fuel trouble codes. Now when in park or neutral pressing the gas pedal the engine revs to max 3500 rpm and down to 3000. It just goes up and down and never past 3500. When in drive I have put transmition in second and brought it up to 5000 rpm with no issue.

I am wondering if anyone has run accross this before and what the issue might be. Thanks for any help.

John

It’s unclear, are you tryingn to rev the engine to 3500 rpm? Or, does it rev that high from even a little touch to the gas pedal? If it’s this behavior, the throttle position sensor (tps) is defective.

I am trying to rev to anything above 3500 but it will not go any higher than 3500 in park or neutral. If I depress the pedal all the way it surges between 3500 and 3000.

Is it possible the suv has a computer dialed in to restrict over-revving while the vehicle is sitting still in neutral or park?