Bug fixes for schedule.