Bug fix for watchdog