diff --git a/sites/all/modules/hierarchical_select/modules/hs_taxonomy.module b/sites/all/modules/hierarchical_select/modules/hs_taxonomy.module
index 81858fb..f657fa9 100644
--- a/sites/all/modules/hierarchical_select/modules/hs_taxonomy.module
+++ b/sites/all/modules/hierarchical_select/modules/hs_taxonomy.module
@@ -1155,3 +1155,51 @@
   }
   return $depth;
 }
+
+/**
+ * Respond to the deletion of taxonomy vocabularies.
+ *
+ * Modules implementing this hook can respond to the deletion of taxonomy
+ * vocabularies from the database.
+ *
+ * @param $vocabulary
+ *   A taxonomy vocabulary object.
+ */
+function hs_taxonomy_taxonomy_vocabulary_delete($vocabulary) {
+  require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'hierarchical_select') . '/includes/common.inc';
+  
+  $old_config_id = "taxonomy-{$vocabulary->vid}";
+  $old_config = variable_get('hs_config_' . $old_config_id, NULL);
+
+  if(!empty($old_config)) {
+    hierarchical_select_common_config_del($old_config_id);
+  }
+  
+  $old_config_id = "taxonomy-{$vocabulary->name}";
+  $old_config = hierarchical_select_common_config_get($old_config_id);
+  if (!empty($old_config)) {
+    hierarchical_select_common_config_del($old_config_id);
+  }
+  
+  foreach (field_info_instances() as $entity_type => $bundles) {
+    foreach ($bundles as $bundle => $field_list) {
+      foreach ($field_list as $field_name => $instance) {
+        if ($instance['widget']['type'] == 'taxonomy_hs') {
+          $field_info = field_info_field($field_name);
+          $allowed_value = $field_info['settings']['allowed_values'][0];
+          $vocabulary_name = $allowed_value['vocabulary'];
+          
+          if($vocabulary_name === $vocabulary->name) {
+            $new_config_id = "taxonomy-{$field_name}";
+            
+            $new_config = hierarchical_select_common_config_get($new_config_id);
+            if (!empty($new_config)) {
+              hierarchical_select_common_config_del($new_config_id);
+            }
+          }
+        }
+      }
+    }
+  }
+
+}
\ No newline at end of file