Scheduler bugfixes and tweaks