Fix schedule generation error