diff --git a/menu_to_taxonomy.module b/menu_to_taxonomy.module
index 01d96c9..38e359f 100644
--- a/menu_to_taxonomy.module
+++ b/menu_to_taxonomy.module
@@ -428,7 +428,7 @@ function _menu_to_taxonomy_save_term_without_access_control($term) {
   drupal_static_reset('drupal_alter');
 
   // Reset the taxonomy term cache so we don't get any old results.
-  entity_get_controller('taxonomy_term')->resetCache(array($tid));
+  entity_get_controller('taxonomy_term')->resetCache(array($term->tid));
 
   // Save the term.
   taxonomy_term_save($term);
@@ -439,7 +439,7 @@ function _menu_to_taxonomy_save_term_without_access_control($term) {
     $implementations['query_term_access_alter'] = $original;
     drupal_static_reset('drupal_alter');
     // Reset the cached term.
-    entity_get_controller('taxonomy_term')->resetCache(array($tid));
+    entity_get_controller('taxonomy_term')->resetCache(array($term->tid));
   }
 
   return $term;
