diff --git a/.gitignore b/.gitignore
index 88f87644963b275ec9e08b96278298a724fc55da..4430e54af64cdae6817ccde3931318a9a456477d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,3 +74,4 @@ CMakeDefs.h
 /walberla-config.cmake
 /cmake-build-debug/
 /cmake-build-release/
+/cmake-build-debug-remote/
diff --git a/python/pystencils_walberla/kernel_selection.py b/python/pystencils_walberla/kernel_selection.py
index 21498b0846d32d2c9955a10b70418eeefdcc89ba..5215e599e2a194f622253ffab1cb2564ce50eb2e 100644
--- a/python/pystencils_walberla/kernel_selection.py
+++ b/python/pystencils_walberla/kernel_selection.py
@@ -236,7 +236,7 @@ class KernelFamily:
         return self._ast_attrs[name]
 
     def get_headers(self):
-        all_headers = [get_headers(ast) for ast in self.all_asts]
+        all_headers = [list(get_headers(ast)) for ast in self.all_asts]
         return reduce(merge_sorted_lists, all_headers)
 
     def generate_kernel_invocation_code(self, **kwargs):