fixed error with run and stop mode