fix the bug of schedule