Fixed bug with getting schedules