Index: /trunk/ippTools/src/magicdstool.c
===================================================================
--- /trunk/ippTools/src/magicdstool.c	(revision 33624)
+++ /trunk/ippTools/src/magicdstool.c	(revision 33625)
@@ -779,5 +779,5 @@
     case IPP_STAGE_CAMERA:
         query = NULL;
-        clearRunQuery = "UPDATE chipBackgroundRun SET magicked = 0 where chip_bg_id = %" PRId64;
+        clearRunQuery = "UPDATE camRun SET magicked = 0 where cam_id = %" PRId64;
         break;
     case IPP_STAGE_WARP:
@@ -1242,4 +1242,6 @@
         } else if (!strcmp(state, "failed_cleanup")) {
             new_state = "goto_cleaned";
+        } else if (!strcmp(state, "failed_restore")) {
+            new_state = "goto_restored";
         } else {
             psError(PS_ERR_UNKNOWN, true, "unexpected value for state: %s", state);
@@ -1410,4 +1412,5 @@
           (strcmp(state, "drop") == 0) ||
           (strcmp(state, "wait") == 0) ||
+          (strcmp(state, "failed_restore") == 0) ||
           (strcmp(state, "failed_revert") == 0) ||
           (strcmp(state, "failed_revert_ud") == 0) ||
