diff --git a/system/pages/highscores.php b/system/pages/highscores.php
index 95647893..dd2efa7b 100644
--- a/system/pages/highscores.php
+++ b/system/pages/highscores.php
@@ -311,7 +311,6 @@ if(config('highscores_balance'))
 /** @var Twig\Environment $twig */
 $twig->display('highscores.html.twig', [
 	'highscores' => $highscores,
-	'totalRows' => $i - 1,
 	'list' => $list,
 	'skill' => $skill,
 	'skillName' => ($skill == SKILL_FRAGS ? 'Frags' : ($skill == SKILL_BALANCE ? 'Balance' : getSkillName($skill))),
diff --git a/system/templates/highscores.html.twig b/system/templates/highscores.html.twig
index 3b9224e2..2e32b7de 100644
--- a/system/templates/highscores.html.twig
+++ b/system/templates/highscores.html.twig
@@ -48,7 +48,7 @@
 					{% endif %}
 				</tr>
 
-				{% if totalRows < 1 %}
+				{% if highscores|length < 1 %}
 				<tr bgcolor="{{ config('darkborder') }}"><td colspan="100%">No records yet.</td></tr>
 				{% else %}
 					{% set row = 0 %}