scheduler: fix the start/stop handling