diff --git a/ih/workflow.py b/ih/workflow.py
index 1a6e386548828c34b893926dd606c947e7a88ae6..7c5e470b90e24633a471c4d74459b3b30df1339d 100644
--- a/ih/workflow.py
+++ b/ih/workflow.py
@@ -648,11 +648,11 @@ class ImageProcessor(Workflow):
                     if jobnum == self.config["cluster"]:
                         jobnum = 0
                         clusternum[type] += 1
-                        exDep[type].append([])
-                        exInput[type].append({})
                     if ((clusternum[type] * 100 + jobnum) % int(self.config["cluster"] * 0.3)) == 0:
                         meancluster[type] += 1
                     if (jobnum % 50) == 0:
+                        exDep[type].append([])
+                        exInput[type].append({})
                         excluster[type] += 1
                 extension = "." + infile.split(".")[1]
                 realname = self.files[self.dax][type]["input"][infile]["path"].split("/")[-1].split(".")[0]
@@ -783,6 +783,8 @@ class ImageProcessor(Workflow):
                     pegasus.stageout.clusters = 4
                     pegasus.transfer.threads = 4
                     pegasus.transfer.lite.threads = 4
+
+                    dagman.maxjobs = 200
                 """)
             wh.write(pegasusrc)
         return