diff --git a/domain_blocks.install b/domain_blocks.install
index ed69ecf..1fe8673 100644
--- a/domain_blocks.install
+++ b/domain_blocks.install
@@ -39,12 +39,12 @@ function domain_blocks_schema() {
       'module' => array('type' => 'varchar', 'length' => '64', 'not null' => TRUE, 'default' => ''),
       'delta' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE, 'default' => 0),
       'realm' => array('type' => 'varchar', 'length' => '20', 'not null ' => TRUE, 'default' => ''),
-      'domain_id' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'domain_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
     ),
     'foreign_keys' => array(
       'domain_id' => array('domain' => 'domain_id'),
     ),
-    'indexes ' => array(
+    'indexes' => array(
       'domain_id' => array('domain_id'),
       'domain_realm_grant' => array('domain_id', 'realm'),
     ),
@@ -57,20 +57,55 @@ function domain_blocks_schema() {
 * Implements hook_dependencies().
 */
 function domain_blocks_update_dependencies() {
-  //Only apply update 7300 if Domain Access has been updated to
+  //Only apply update 7301 if Domain Access has been updated to
   //the 7.3 branch.
-  $dependencies['domain_blocks'][7300] = array(
+  $dependencies['domain_blocks'][7301] = array(
     'domain' => 7303,
   );
   return $dependencies;
 }
 
+
+/**
+ * Update domain_blocks schema to allow negative values in domain_id field.
+ */
+function domain_blocks_update_7300(&$sandbox) {
+  // Determine if there are any entries in {domain_blocks} table that would 
+  // require field change
+  $default = db_query("SELECT * FROM {domain_blocks} WHERE domain_id = 0")->fetchAssoc();
+  if (empty($default)) {
+    return t('Domain Blocks did not find an existing domain 0. No updates required.');
+  }
+  
+  // Remove indexes before field change
+  db_drop_index('domain_blocks', 'domain_id');
+  db_drop_index('domain_blocks', 'domain_realm_grant');
+            
+  // Set domain_id field to signed int to accommodate negative values
+  // and re-create indexes
+  db_change_field('domain_blocks', 'domain_id', 'domain_id',
+    array(
+      'type' => 'int', 
+      'not null' => TRUE, 
+      'unsigned' => FALSE, 
+      'default' => 0
+      ),
+    array(
+    'indexes' => array(
+        'domain_id' => array('domain_id'),
+        'domain_realm_grant' => array('domain_id', 'realm'),
+      )
+    )
+  );
+  return t('Domain Blocks domain_id field updated.');
+}
+
 /**
  * Change all references to domain_id 0 to -1 when referring to "all" grant
  * and to the id of the default domain when referring to the default domain
  * in domain_blocks table.
  */
-function domain_blocks_update_7300(&$sandbox) {
+function domain_blocks_update_7301(&$sandbox) {
   // Update 'domain_site'grant first to make sure it does not get overwritten.
   // Note that Domain module assumes that domain_id is always a foreign key.
   $query = db_update('domain_blocks')
diff --git a/domain_blocks.module b/domain_blocks.module
index f45fc13..0a1d98a 100644
--- a/domain_blocks.module
+++ b/domain_blocks.module
@@ -131,7 +131,7 @@ function domain_blocks_save($module, $delta, $current_domains, $previous_domains
  * Implements hook_form_alter().
  */
 function domain_blocks_form_alter(&$form, &$form_state, $form_id) {
-  if (in_array($form_id, array('block_admin_configure', 'block_box_form', 'block_add_block_form'))) {
+  if (in_array($form_id, array('block_admin_configure', 'block_custom_block_delete', 'block_add_block_form'))) {
     // If the user is a site admin, show the form, otherwise pass it silently.
     if (user_access('set domain access')) {
       $module = $form['module']['#value'];
@@ -185,7 +185,7 @@ function domain_blocks_form_alter(&$form, &$form_state, $form_id) {
     }
   }
   // Submit handler for user defined block deletion
-  if ($form_id == 'block_box_delete') {
+  if ($form_id == 'block_custom_block_delete') {
     $form['#submit'][] = 'domain_blocks_delete_submit';
   }
   // Blocks overview form submit
@@ -249,7 +249,8 @@ function domain_blocks_admin_display_submit($form, &$form_state) {
  * This is equivalent of db_rewrite_sql() back in D6
  */
 function domain_blocks_block_list_alter(&$blocks) {
-  global $_domain, $theme_key;
+  global $theme_key;
+  $_domain = domain_get_domain();
   $block_domains = array();
   $result = db_query("SELECT domain_id, realm, module, delta FROM {domain_blocks} WHERE
   (domain_id = :domain_id AND realm = 'domain_id') OR (domain_id = -1 AND realm = 'domain_site')",
@@ -312,21 +313,9 @@ function _domain_blocks_load($module, $delta) {
 }
 
 /**
- * Implements hook_domain_update().
+ * Implements hook_domain_delete().
  */
-function domain_blocks_domain_update($op, $domain, $edit = array()) {
-  switch ($op) {
-    case 'delete':
-      // remove records
-      _domain_blocks_delete($domain);
-    case 'update':
-    case 'insert':
-    default:
-      break;
-  }
-}
-
-function _domain_blocks_delete($domain) {
+function domain_blocks_domain_delete($domain, $form_values = array()) {
   db_delete('domain_blocks')
     ->condition('domain_id', $domain['domain_id'])
     ->condition('realm', 'domain_id')
