fix sched bug