diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py
index db8123a60c097a02d0fb7835fb8c05ec48a5a00c..fdccb8b90666beef7d5703e0dd75921943889e0b 100755
--- a/xfel_calibrate/calibrate.py
+++ b/xfel_calibrate/calibrate.py
@@ -682,12 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
     return jobid
 
 
-def make_par_table(parms, run_temp_path):
+def make_par_table(parms, run_tmp_path):
     """
-    Create a table with input parameters if the notebook
+    Create a table with input parameters of the notebook
 
     :param parms: parameters of the notebook
-    :param run_temp_path: path to temporary directory for running job outputs
+    :param run_tmp_path: path to temporary directory for running job outputs
     """
 
     # Add space in long strings without line breakers ` ,-/` to
@@ -743,7 +743,7 @@ def make_par_table(parms, run_temp_path):
                         \end{longtable}
                     ''')
 
-    f_name = "{}/InputParameters.rst".format(run_temp_path)
+    f_name = "{}/InputParameters.rst".format(run_tmp_path)
     with open(f_name, "w") as finfile:
         finfile.write(textwrap.dedent(tmpl.render(p=col_type, lines=l_parms)))
 
@@ -835,7 +835,7 @@ def run():
 
         # Write all input parameters to rst file to be included to final report
         parms = parameter_values(parms, **args)
-        make_par_table(parms, temp_path, run_uuid)
+        make_par_table(parms, run_tmp_path)
         save_executed_command(run_tmp_path, version)
 
         # wait on all jobs to run and then finalize the run by creating a report from the notebooks
diff --git a/xfel_calibrate/finalize.py b/xfel_calibrate/finalize.py
index 4a912bc61e9742b7ca256b62bb13007bb7363ff5..fd099370b079b8c4c31bf419c14ada252e889ffa 100644
--- a/xfel_calibrate/finalize.py
+++ b/xfel_calibrate/finalize.py
@@ -277,8 +277,8 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
     temp_dirs = glob(f'{tmp_path}/*/')
     # Remove folders with figures and sphinx files.
     print(f"Removing directories [{temp_dirs}] in temp folder: {tmp_path}")
-
-    [rmtree(f'{dtmp}/') for dtmp in temp_dirs]
+    for dtmp in temp_dirs:
+        rmtree(f'{dtmp}/')
 
     # Moving temporary files to out-folder after successful execution
     # This helps in keeping elements needed for re-producibility.