Fix kernel sched bug