Fix an error of check_should_schedule.