Why is my engine reving every time I engage the clutch or have it in idle? on 2006 Kia Spectra

RPM surge randomly while car is driving. I just replaced the TPS and the MAF sensor, and now the engine wants to rev every time I push in the clutch. It also revs occasionally in idle.

Asked by for the 2006 Kia Spectra
2 answers
Possible TPS improperly adjusted or throttle plate problem?
possible vacuum leak