Index: /trunk/ippTools/src/remotetool.c
===================================================================
--- /trunk/ippTools/src/remotetool.c	(revision 36895)
+++ /trunk/ippTools/src/remotetool.c	(revision 36896)
@@ -95,4 +95,5 @@
   // Get a list of the things we can insert into a new component
   psString query = NULL;
+  psString whereOption = psStringCopy("");
   if (!strcmp(stage,"chip")) {
     query = pxDataGet("remotetool_definebyquery_chip.sql");
@@ -125,5 +126,7 @@
     
     if (label) {
-      psStringAppend(&query, " AND (warpRun.label = '%s')", label);
+      // Because warp has to check to see if something other than the state is set correctly, I have to use this wonky way to pass the label in.
+      //      psStringAppend(&query, " AND (warpRun.label = '%s')", label);
+      psStringAppend(&whereOption, "\n AND (warpRun.label = '%s')", label);
     }
   }    
@@ -149,5 +152,5 @@
     psFree(limitString);
   }
-  if (!p_psDBRunQuery(config->dbh, query)) {
+  if (!p_psDBRunQueryF(config->dbh, query,whereOption)) {
     psError(PS_ERR_UNKNOWN, false, "database error");
     psFree(query);
@@ -313,5 +316,6 @@
 {
   PS_ASSERT_PTR_NON_NULL(config, false);
-  // PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
+  PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
+  psAssert(remote_id,"This should have failed before this point.");
   
   psMetadata *where = psMetadataAlloc();
@@ -341,6 +345,7 @@
 {
   PS_ASSERT_PTR_NON_NULL(config, false);
-  // PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
-  
+  PXOPT_LOOKUP_S64(remote_id,  config->args, "-remote_id",    true, false);
+  psAssert(remote_id,"This should have failed before this point.");
+
   psMetadata *where = psMetadataAlloc();
   // Wheres
