diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py
index 78738dcc716c42a2f928ca1ef5706e4e2cc40401..a1572c7b9f82a0bb60341fed627a7478b424f55d 100755
--- a/xfel_calibrate/calibrate.py
+++ b/xfel_calibrate/calibrate.py
@@ -503,7 +503,8 @@ def create_finalize_script(fmt_args, temp_path, job_list):
     :param temp_path: Path to temporary folder to run slurm job
     :param job_list: List of slurm jobs
     """
-    tmpl = Template("""#!/usr/bin/env python3
+    tmpl = Template("""\
+                    #!/usr/bin/env python3
                     import sys
                     from xfel_calibrate.finalize import finalize
 
@@ -722,12 +723,12 @@ def make_par_table(parms, run_tmp_path):
         col_type[1] = col_type[2]
 
     tmpl = Template('''
-                    Input of the calibration pipeline 
+                    Input of the calibration pipeline
                     =================================
 
                     .. raw:: latex
 
-                        \\begin{longtable}{ {% for k in p %}{{k}}{%- endfor %} } 
+                        \\begin{longtable}{ {% for k in p %}{{k}}{%- endfor %} }
                         \hline
                         {% for k in lines %}
                         {{ k[0] }} & {{ k[1] }} & {{ k[2] }} \\\\