diff --git a/public_html/script.js b/public_html/script.js
index 21c355d..7dc436b 100644
--- a/public_html/script.js
+++ b/public_html/script.js
@@ -888,7 +888,11 @@ function refreshTableInfo() {
}
// ICAO doesn't change
- tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight);
+ if (tableplane.flight) {
+ tableplane.tr.cells[2].innerHTML = getFlightAwareModeSLink(tableplane.icao, tableplane.flight, tableplane.flight);
+ } else {
+ tableplane.tr.cells[2].innerHTML = "";
+ }
tableplane.tr.cells[3].textContent = (tableplane.registration !== null ? tableplane.registration : "");
tableplane.tr.cells[4].textContent = (tableplane.icaotype !== null ? tableplane.icaotype : "");
tableplane.tr.cells[5].textContent = (tableplane.squawk !== null ? tableplane.squawk : "");