Fixed bug: Crashing when inserting timetable.