watchdog fixed and tested