diff --git a/templates/index.html.ep b/templates/index.html.ep
index 390c6ce..1eb29ad 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -19,7 +19,7 @@
<% } =%>
-<% unless ($last_page == 1) { =%>
+<% if ($last_page && $last_page != 1) { =%>