Scheduler bugfix.