Index: trunk/ippTools/src/magictool.c
===================================================================
--- trunk/ippTools/src/magictool.c	(revision 26033)
+++ trunk/ippTools/src/magictool.c	(revision 26034)
@@ -153,8 +153,7 @@
         psStringAppend(&queryWhereStr, "\n%s (magic_id IS NULL", queryWhereStr ? "AND" : "WHERE");
         if (rerun) {
-            psStringAppend(&queryWhereStr, " OR magicRun.label != '%s')", label);
-        } else {
-            psStringAppend(&queryWhereStr, ") ");
-        }
+            psStringAppend(&queryWhereStr, " OR (magicRun.label != '%s')", label);
+        }
+        psStringAppend(&queryWhereStr, ") ");
 
         // now add the user specified qualifiers
