2008 Subaru Impreza

Car continues to rev for 3-4 seconds when clutch is pushed in to shift, or any time clutch is pushed in

subaru temp gauge stuck on high

We have replaced the sensor twice and replaced the coolant.  It does it even when we first start the car up.