Index: trunk/ippTools/src/stacktool.c
===================================================================
--- trunk/ippTools/src/stacktool.c	(revision 19931)
+++ trunk/ippTools/src/stacktool.c	(revision 21402)
@@ -358,6 +358,6 @@
         // this insert needs to use exactly the same restrictions (race condition is probably not critical)
         // the insert below seems to only restrict matches to the skycell, tess, and filter
-        if ((randomLimit > 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, filter, randomLimit)) ||
-            (randomLimit <= 0 && !p_psDBRunQuery(config->dbh, thisInsert, skycell_id, filter))) {
+        if ((randomLimit > 0 && !p_psDBRunQueryF(config->dbh, thisInsert, skycell_id, filter, randomLimit)) ||
+            (randomLimit <= 0 && !p_psDBRunQueryF(config->dbh, thisInsert, skycell_id, filter))) {
             psError(PS_ERR_UNKNOWN, false, "database error");
             psFree(thisInsert);
@@ -968,5 +968,5 @@
 
     char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = %"PRId64;
-    if (!p_psDBRunQuery(config->dbh, query, state, stack_id)) {
+    if (!p_psDBRunQueryF(config->dbh, query, state, stack_id)) {
         psError(PS_ERR_UNKNOWN, false,
                 "failed to change state for stack_id %"PRId64, stack_id);
