diff --git a/templates/map.html b/templates/map.html
index dc32f03..d2910bf 100644
--- a/templates/map.html
+++ b/templates/map.html
@@ -121,8 +121,8 @@ function UpdateMap(e) {
if (temp.includes(Number(y))){
Lines[norad][y]._latlngs[1]= {"lat":satPos[0],"lng":satPos[1]}
}else{
- Lines[norad][x[0]].removeFrom(mymap)
- delete Lines[norad][x[0]]
+ Lines[norad][y].removeFrom(mymap)
+ delete Lines[norad][y]
}
})}else{Lines[norad][x[0]] = new L.Polyline([[Stations[x[0]]._latlng.lat,Stations[x[0]]._latlng.lng],[satPos[0],satPos[1]]], {color: x[1],weight: 3,opacity: 1,smoothFactor: 1});