Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 7693)
+++ /trunk/ippTools/src/dettool.c	(revision 7694)
@@ -1420,12 +1420,12 @@
                 ((detResidImfileAnalysisRow *)residImfiles->data[j])->det_id)
                 &&
-                (strcmp(
-                ((detProcessedImfileRow *)normalizedImfiles->data[i])->exp_id,
-                ((detResidImfileAnalysisRow *)residImfiles->data[j])->exp_id) == 0)
+                (((detNormalizedImfileRow *)normalizedImfiles->data[i])->iteration
+                    ==
+                ((detResidImfileAnalysisRow *)residImfiles->data[j])->iteration)
                 &&
                 (strcmp(
-                ((detProcessedImfileRow *)normalizedImfiles->data[i])->class_id,
-                ((detResidImfileAnalysisRow *)residImfiles->data[j])->class_id) == 0)
-                ) {
+                ((detNormalizedImfileRow *)normalizedImfiles->data[i])->class_id,
+                ((detResidImfileAnalysisRow *)residImfiles->data[j])->class_id) == 0))
+                 {
 
                     // remove the rawImfiles from the list
