Fixed some bugs with creating schedules