fixed the scheduler.c's underflow