Fixed termination of Watchdog thread