diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py
index 27d835ab97c8b8cfdd5a693d4c62fe477d05c81f..5e83f52ee88f3abcf1565b148f26bc7eb9bce4b6 100644
--- a/src/imcflibs/imagej/shading.py
+++ b/src/imcflibs/imagej/shading.py
@@ -113,3 +113,4 @@ def process_folder(path, suffix, outpath, model_file, fmt):
     for orig_file in matching_files:
         in_file = os.path.join(path, orig_file)
         correct_and_project(in_file, outpath, imp, 'ALL', fmt)
+    imp.close()