Fixed task list possibly being unsorted in the Scheduler.