diff --git a/src/main/resources/templates/application/all_flexdelft.html b/src/main/resources/templates/application/all_flexdelft.html
index e8c8e06c4fe96afc1b7d82e92fa042a5dcdb4392..f9922d37d232f9fff63d5608bc9b5f875131425f 100644
--- a/src/main/resources/templates/application/all_flexdelft.html
+++ b/src/main/resources/templates/application/all_flexdelft.html
@@ -111,9 +111,7 @@
                             th:each="period: ${periods}"
                             th:value="${period.id}"
                             th:text="${period.name}"
-                            th:selected="${param.academicPeriods == null
-                            || #arrays.contains(
-                            #strings.arraySplit(param.academicPeriods,','), period.id.toString())}" />
+                            th:selected="${param.academicPeriods != null && param.academicPeriods.contains(period.id.toString())}" />
                     </select>
                 </div>
                 <div class="flex vertical gap-1">