                                      (range time-helper/TIME-INDEX-MIN
                                             (inc time-helper/TIME-INDEX-MAX))))}
         ; go through each row in the day, below the current row
-        (drop (inc rowNum) (map vector (range (count ttDay)) ttDay))))))
+        (drop (inc rowNum) (range (get-nr-rows-in-timetable-day day)))))))
 
 (defn- shift-lesson-to-row!
   "Shifts a lesson from its original row up to the given row.

  [day rowNum]
  (not (timetable-row-empty? day rowNum)))

(defn- create-lesson-div
  "Creates a <div> element for a new lesson using jQuery"
  [& {:keys [moduleCode moduleName lessonType lessonGroup venue slotsOcc

   `:day` and `:rowNum` keys, and values are jQuery <div> objects for the
   shifted lesson."
  [{:keys [day rowNum startTime endTime] :as removedAugTTLessonInfo}]
  (let [; This is the time range freed up by removal of the lesson
        [lowTimeIdx highTimeIdx]
        (get-largest-consecutive-time-slot-freed-up-by-lesson
          removedAugTTLessonInfo)
