diff --git a/templates/contests/index.html b/templates/contests/index.html
index 3c00eda..7e1ef71 100644
--- a/templates/contests/index.html
+++ b/templates/contests/index.html
@@ -44,9 +44,12 @@
Upcoming Contests
Duration: {{ contest.start_time|timesince:contest.end_time }}
-
- {{ contest.problems.all|length }} problems
-
+ {% if contest.problems.all.count > 0 %}
+
+ {{ contest.problems.all.count }}
+ problem{{ contest.problems.all.count|pluralize:"s" }}
+
+ {% endif %}
@@ -94,9 +97,12 @@ Past Contests
Duration: {{ contest.start_time|timesince:contest.end_time }}
-
- {{ contest.problems.all|length }} problems
-
+ {% if contest.problems.all.count > 0 %}
+
+ {{ contest.problems.all.count }}
+ problem{{ contest.problems.all.count|pluralize:"s" }}
+
+ {% endif %}