diff --git a/js/views/l9n.js b/js/views/l9n.js
index ebf435b..1e0e7f4 100644
--- a/js/views/l9n.js
+++ b/js/views/l9n.js
@@ -49,6 +49,19 @@
       0,0,0);
     return Math.floor((now.getTime() - then.getTime())/1000);
   },
+  getTime: function() {
+    return Math.floor((new Date()).getTime()/1000);
+  },
+  timeSinceMidnightInverse: function(sec) {
+    var now = new Date();
+    var today = new Date(
+      now.getFullYear(),
+      now.getMonth(),
+      now.getDate(),
+      0,0,0);
+
+    return Math.floor(today.getTime()/1000) + sec;
+  },
   prettyTime: function(seconds, detailed = true) {
     if (detailed) return (Math.floor(seconds/60)).toString().padStart(2, '0')+":"+(seconds % 60).toString().padStart(2, '0');
     return Math.floor(seconds/60)+"min";
@@ -79,7 +92,7 @@
     trains.appendChild(train);
 
     data._element = time;
-    data._markedToRemove = false;
+    data._removeAtTime = scheduleController.timeSinceMidnightInverse(data.departureTime);
     scheduleController._times.push(data);
   },
   addTime: function(data) {
@@ -122,17 +135,16 @@
   },
   timer: function() {
     var timeSinceMidnight = scheduleController.timeSinceMidnight();
+    var time = scheduleController.getTime();
 
     var removed = 0;
     for (var i = 0;; ++i) {
       if (scheduleController._times[i - removed] === undefined) break;
 
-      if (scheduleController._times[i - removed]._markedToRemove) {
+      if (scheduleController._times[i - removed]._removeAtTime < time) {
         scheduleController.removeElement(scheduleController._times[i - removed]._element.parentNode);
         scheduleController._times.shift();
         ++removed;
-      } else if (scheduleController._times[i - removed].departureTime - timeSinceMidnight == 0) {
-        scheduleController._times[i - removed]._markedToRemove = true;
       }
     }
 
