I'm not sure how a thermocouple could ever keep a boiler "on" as is a safety device which fails to safe... But heck - Magic does happen I suppose :?
Anyway - Check the wiring to the switch...
Should be Yellow piggy backed onto Yellow (At top), then brown, then white (At bottom)...