diff --git a/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp b/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
index 6aec87cacbf3e1689ad07659f50e2b7d9c8206b1..9f032a9ed79d54bf9c742fae64cf8a612bce2371 100644
--- a/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
+++ b/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.cpp
@@ -23,6 +23,9 @@
 #include "core/DataTypes.h"
 #include "core/Macros.h"
 #include "{{class_name}}.h"
+{% for header in headers %}
+#include {{header}}
+{% endfor %}
 
 
 {% if target is equalto 'cpu' -%}