Scheduler code changes