Fixed bugs in GenerateSchedule.js and courses.js