diff --git a/cms/server/contest/templates/communication.html b/cms/server/contest/templates/communication.html
index 13231fb52b..82efbbf056 100644
--- a/cms/server/contest/templates/communication.html
+++ b/cms/server/contest/templates/communication.html
@@ -29,6 +29,25 @@
{% trans %}(no subject){% endtrans %}
{% endif %}
+{% if participation.messages|length > 0 %}
+{% trans %}Messages{% endtrans %}
+
+ {% for msg in participation.messages|reverse %}
+
+ {% if msg.subject|length > 0 %}
+
{{ msg.subject }}
+ {% else %}
+
{% trans %}(no subject){% endtrans %}
+ {% endif %}
+
{{ msg.timestamp|format_datetime_smart }}
+ {% if msg.text|length > 0 %}
+
{{ msg.text | markdown }}
+ {% endif %}
+
+ {% endfor %}
+
+{% endif %}
+
{% if questions_enabled %}
@@ -106,24 +125,7 @@ {% trans %}(no subject){% endtrans %}
{% endif %}
-{% if participation.messages|length > 0 %}
-{% trans %}Messages{% endtrans %}
-
- {% for msg in participation.messages|reverse %}
-
- {% if msg.subject|length > 0 %}
-
{{ msg.subject }}
- {% else %}
-
{% trans %}(no subject){% endtrans %}
- {% endif %}
-
{{ msg.timestamp|format_datetime_smart }}
- {% if msg.text|length > 0 %}
-
{{ msg.text | markdown }}
- {% endif %}
-
- {% endfor %}
-
-{% endif %}
+