Fix bugs JS around timetable