diff --git a/test-template-generator/resources/js/linkConnector.js b/test-template-generator/resources/js/linkConnector.js
index 5e37d04..293a5a5 100644
--- a/test-template-generator/resources/js/linkConnector.js
+++ b/test-template-generator/resources/js/linkConnector.js
@@ -5,10 +5,10 @@ for (i=0; i<taskArray.length; i++) {
 
     const linkElement = document.createElement("div");
     linkElement.className = "linkElement";
+    const path = taskArray[i]["path"];
 
-    //TODO: taskArray needs to be preprocessed somehow
     linkElement.addEventListener("click", function () {
-        window.location = taskArray[i]["path"];
+        window.location.href = path;
     } )
 
     const h2 = document.createElement("h2");
@@ -19,10 +19,4 @@ for (i=0; i<taskArray.length; i++) {
     h2.appendChild(link);
     linkElement.appendChild(h2);
     grid.appendChild(linkElement);
-
-    console.log(grid.querySelectorAll(".linkElement")[i]);
-    grid.querySelectorAll(".linkElement")[i].addEventListener("onclick", function () {
-
-        window.location = taskArray[i]["path"];
-    }, false);
 }
\ No newline at end of file