Index: branches/eam_branches/ipp-20130509/ippTools/src/bgtool.c
===================================================================
--- branches/eam_branches/ipp-20130509/ippTools/src/bgtool.c	(revision 35594)
+++ branches/eam_branches/ipp-20130509/ippTools/src/bgtool.c	(revision 35747)
@@ -774,6 +774,6 @@
 
     psMetadata *where = psMetadataAlloc();
-    PXOPT_COPY_S64(config->args, where, "-chip_bg_id", "chip_bg_id", "==");
-    pxAddLabelSearchArgs(config, where, "-label", "label", "==");
+    PXOPT_COPY_S64(config->args, where, "-chip_bg_id", "chipBackgroundRun.chip_bg_id", "==");
+    pxAddLabelSearchArgs(config, where, "-label", "chipBackgroundRun.label", "==");
     PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
 
Index: branches/eam_branches/ipp-20130509/ippTools/src/chiptool.c
===================================================================
--- branches/eam_branches/ipp-20130509/ippTools/src/chiptool.c	(revision 35594)
+++ branches/eam_branches/ipp-20130509/ippTools/src/chiptool.c	(revision 35747)
@@ -493,5 +493,5 @@
     psFree(where);
 
-    psStringAppend(&query, "\nORDER BY priority DESC, chip_id");
+    psStringAppend(&query, "\nORDER BY priority DESC, chip_id, class_id");
 
     // treat limit == 0 as "no limit"
Index: branches/eam_branches/ipp-20130509/ippTools/src/pstamptool.c
===================================================================
--- branches/eam_branches/ipp-20130509/ippTools/src/pstamptool.c	(revision 35594)
+++ branches/eam_branches/ipp-20130509/ippTools/src/pstamptool.c	(revision 35747)
@@ -142,7 +142,4 @@
     PXOPT_LOOKUP_STR(label,       config->args, "-set_label",         false, false);
     PXOPT_LOOKUP_S32(pollInterval, config->args, "-set_poll_interval",false, false);
-    PXOPT_LOOKUP_BOOL(no_magic, config->args, "-set_no_magic", false);
-
-    bool need_magic = ! no_magic;
 
     if (!pstampDataStoreInsert(config->dbh,
@@ -155,5 +152,5 @@
             uri,
             pollInterval,
-            need_magic
+            false
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
Index: branches/eam_branches/ipp-20130509/ippTools/src/pstamptoolConfig.c
===================================================================
--- branches/eam_branches/ipp-20130509/ippTools/src/pstamptoolConfig.c	(revision 35594)
+++ branches/eam_branches/ipp-20130509/ippTools/src/pstamptoolConfig.c	(revision 35747)
@@ -51,5 +51,4 @@
     psMetadataAddStr(adddatastoreArgs, PS_LIST_TAIL, "-set_label",        0, "define datastore label", NULL);
     psMetadataAddS32(adddatastoreArgs, PS_LIST_TAIL, "-set_poll_interval", 0, "define datastore poll interval (seconds)", 60);
-    psMetadataAddBool(adddatastoreArgs,PS_LIST_TAIL, "-set_no_magic",   0, "set magic not required", true);
 
     // -datastore
