diff --git a/assess_userscript.js b/assess_userscript.js
index da2cc8673ecff35f773536cba98cf89d4dc81ac5..2710271ea1082e1614f2e85f7cf66fafd8dc264d 100644
--- a/assess_userscript.js
+++ b/assess_userscript.js
@@ -5,6 +5,7 @@
 // @include https://ess.cs.tu-dortmund.de/ASSESS/*
 // ==/UserScript==
 
+
 const timetable = `
 <table class="calendar">
 <thead class="days-week">
@@ -84,8 +85,9 @@ function run()
         const slotStartId = timeStr.substr(1,2).toLowerCase()+'_'+ startNum
 
         // get prio info
-        const rankElem = row[2].getElementsByTagName('div')[0].getElementsByTagName('div')[2]
+        const rankElem = row[row.length-1].getElementsByTagName('div')[0].getElementsByTagName('div')[2]
 
+        try {
         // enter into timetable
         const slotElem = document.getElementById(slotStartId)
         slotElem.setAttribute("rowspan", slotLen)
@@ -93,6 +95,7 @@ function run()
         slotElem.setAttribute("style","background-color: #726a6a;")
 
         console.log(slotStartId + ' -> '+slotLen)
+        } catch (e) {console.error(e)}
     }