Fixed the last bugs that prevented timetable from working (still not complete)