diff --git a/templates/courses.html b/templates/courses.html
index 21c2dee820a655fc5f09006e12d8191cbd8ab6c7..9be576a26ddc136c3a6126671e01844f61b8b0a9 100644
--- a/templates/courses.html
+++ b/templates/courses.html
@@ -56,11 +56,11 @@
 		</ul>
 	</div></div>
 </div>
+{% endfor %}
 <div class="visible-xs" id="xs-check"></div>
 <script>
 if($("#xs-check").is(":visible")) {
 	$("#zeitlos").removeClass('in')
 }
 </script>
-{% endfor %}
 {% endblock %}