return "Exchange backup already in progress.";
    case hrLogfileNotContiguous:
       return "Existing log file is not contiguous. Check that no stale files are left in the Exchange data/log directories.";
+   case hrErrorFromESECall:
+      return "Error returned from ESE function call. Check the Windows Event Logs for more information.";
    case hrCBDatabaseNotFound:
       return "Database not found. Check that the Database you are trying to restore actually exists in the Storage Group you are restoring to.";
    default:
 
 #define hrMissingFullBackup         (HRESULT)0xC8000230L
 #define hrBackupInProgress          (HRESULT)0xC80001F9L
 #define hrCBDatabaseNotFound        (HRESULT)0xC7FE1F42L
+#define hrErrorFromESECall          (HRESULT)0xC7FF1004L
 
 extern HrESEBackupRestoreGetNodes_t HrESEBackupRestoreGetNodes;
 extern HrESEBackupPrepare_t HrESEBackupPrepare;
 
          if (result != 0)
          {
             _JobMessage(M_ERROR, "HrESERestoreComplete failed with error 0x%08x - %s\n", result, ESEErrorMessage(result));
+            _DebugMessage(100, "Calling HrESERestoreClose\n");
+            result = HrESERestoreClose(hccx, RESTORE_CLOSE_NORMAL);
             state = 999;
             break;
          }
       context->current_node = parent;
       return bRC_OK;
    case 999:
+      context->current_node = parent;
       return bRC_OK;
    }