diff --git a/app/templates/index.html b/app/templates/index.html
index 5f5f4a7..8db1638 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -39,15 +39,17 @@
{% endfor %}
-
- {% if has_previous_page %}
-
Previous
- {% endif %}
+ {% if has_previous_page or has_next_page %}
+
+ {% if has_previous_page %}
+
Previous
+ {% endif %}
- {% if has_next_page %}
-
Next
- {% endif %}
-
+ {% if has_next_page %}
+
Next
+ {% endif %}
+
+ {% endif %}
{% else %}