diff --git a/auto_nodetitle.module b/auto_nodetitle.module
index 7f6e3eb..54352a9 100644
--- a/auto_nodetitle.module
+++ b/auto_nodetitle.module
@@ -275,25 +275,24 @@ function auto_nodetitle_eval($code, $node) {
 }
 
 /**
- * Implements hook_node_type().
+ * Implements hook_node_type_delete().
  */
-function auto_nodetitle_node_type($op, $info) {
-  switch ($op) {
-    case 'delete':
-      variable_del('ant_' . $info->type);
-      variable_del('ant_pattern_' . $info->type);
-      variable_del('ant_php_' . $info->type);
-      break;
-
-    case 'update':
-      if (!empty($info->old_type) && $info->old_type != $info->type) {
-        variable_set('ant_' . $info->type, auto_nodetitle_get_setting($info->old_type));
-        variable_set('ant_pattern_' . $info->type, variable_get('ant_pattern_' . $info->old_type, ''));
-        variable_set('ant_php_' . $info->type, variable_get('ant_php_' . $info->old_type, ''));
-        variable_del('ant_' . $info->old_type);
-        variable_del('ant_pattern_' . $info->old_type);
-        variable_del('ant_php_' . $info->old_type);
-      }
-      break;
-  }
+function auto_nodetitle_node_type_delete($info) {
+  variable_del('ant_' . $info->type);
+  variable_del('ant_pattern_' . $info->type);
+  variable_del('ant_php_' . $info->type);
 }
+
+/**
+ * Implements hook_node_type_update().
+ */
+function auto_nodetitle_node_type_update($info) {
+  if (!empty($info->old_type) && $info->old_type != $info->type) {
+    variable_set('ant_' . $info->type, auto_nodetitle_get_setting($info->old_type));
+    variable_set('ant_pattern_' . $info->type, variable_get('ant_pattern_' . $info->old_type, ''));
+    variable_set('ant_php_' . $info->type, variable_get('ant_php_' . $info->old_type, ''));
+    variable_del('ant_' . $info->old_type);
+    variable_del('ant_pattern_' . $info->old_type);
+    variable_del('ant_php_' . $info->old_type);
+   }
+ }
