fix watchdog restart issues and others