Index: trunk/ippToPsps/jython/diffbatch.py
===================================================================
--- trunk/ippToPsps/jython/diffbatch.py	(revision 39321)
+++ trunk/ippToPsps/jython/diffbatch.py	(revision 39322)
@@ -679,4 +679,5 @@
         self.skipBatch = False
         self.tablesToExport = []
+        tablesForMinMax = []
         for num in self.number:
 
@@ -691,5 +692,6 @@
             self.populateDiffDetectionTable(num, 0) # populate the negative image data (if present)
             self.logger.infoPair("populated","DiffDetection_"+str(num))
-            self.setMinMaxDiffObjID(["DiffDetection_"+str(num)])
+#            self.setMinMaxDiffObjID(["DiffDetection_"+str(num)])
+            tablesForMinMax.append("DiffDetection_"+str(num))
 
             self.populateDiffDetEffMeta(num)
@@ -697,4 +699,6 @@
             # CZW: I appended to tablesToExport inside populateDiffDetEffMeta to be like stack.
 
+        # CZW: This needs to be done outside the loop on a list of all detection tables
+        self.setMinMaxDiffObjID(tablesForMinMax)
         #test = self.scratchDb.getRowCount("Object")
         #return False
