How Do I Connect My Lawn Mower Thermostat To The Air Vane?

I was disconnecting my muffler, and the thermostat(?) became disconnected from the air vane. I connected it again, and the engine made a knocking sound.
Specs – Craftsman 6.5hp Power-Propelled Rotary Lawn Mower