diff --git a/app/routes.py b/app/routes.py
index 3f39f2b9c210372f10b1f122e5f566ca5b143710..a3292b9082c775257dce82e08e3ec8d341b61734 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -35,7 +35,7 @@ if exists(CONFIG_PATH):
 def expand_wildcards(plot_layout):
     """Replace wildcard entries with list of files"""
     plots = []
-    for row in AHRS_PLOTS:
+    for row in plot_layout:
         if not isinstance(row, list) and '*' in row:
             plots.append(
                 sorted([