Fixes bug in watchdog