Bug fix for schedule.