fixed bug from normal command line use
fixed bug from watchdog use