diff --git a/frontend/main.ts b/frontend/main.ts
index 1bc80ed..1978699 100644
--- a/frontend/main.ts
+++ b/frontend/main.ts
@@ -138,9 +138,12 @@ function selectBoatChange() {
         const formattedDateTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}T${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}`;
         
         inputElement.value = formattedDateTime;
-    
-	document.getElementById("distance_in_km").value = ""; 
-	document.getElementById("destination").dispatchEvent(new Event('input')); 
+
+	const distinput = <HTMLInputElement>document.querySelector('#distance_in_km');
+	distinput.value = ""; 
+
+	const destinput= <HTMLInputElement>document.querySelector('#destination');
+	destinput.dispatchEvent(new Event('input')); 
     },false);
 
     choiceObjects[boatSelect.id] = boatChoice;
@@ -379,7 +382,6 @@ function initNewChoice(select: HTMLInputElement) {
 	},false);
 
   choiceObjects[select.id] = choice;
-  document.getElementById("distance_in_km").value = "";
 }