diff --git a/cas_server/templates/cas_server/serviceValidate.xml b/cas_server/templates/cas_server/serviceValidate.xml
index f2cdc90..e41a022 100644
--- a/cas_server/templates/cas_server/serviceValidate.xml
+++ b/cas_server/templates/cas_server/serviceValidate.xml
@@ -5,10 +5,9 @@
{% for key, value in attributes %} {{value}}
{% endfor %}
{% for key, value in attributes %}
-{% endfor %}{% if proxyGrantingTicket %}
- {{proxyGrantingTicket}}{% endif %}{% if proxies %}
-
+{% endfor %}{% if proxyGrantingTicket %} {{proxyGrantingTicket}}
+{% endif %}{% if proxies %}
{% for proxy in proxies %} {{proxy}}
-{% endfor %} {% endif %}
-
+{% endfor %}
+{% endif %}