Fixed erroneous variable name in generateSchedule.