Fix code in Schedule Generator