--- taxonomy_menu.module.orig	2009-12-03 19:03:58.000000000 +0100
+++ taxonomy_menu.module	2009-12-03 19:05:48.000000000 +0100
@@ -404,7 +404,7 @@
   }
 
   //let other modules make edits
-  $item = module_invoke_all('taxonomy_menu_'. $op, $item);
+  module_invoke_all('taxonomy_menu_' . $op, $item);
 
   //update the menu and return the mlid if the remove element is not true
  // if (!$item['remove']) {
@@ -568,9 +568,9 @@
  *  )
  *
  */
-function taxonomy_menu_taxonomy_menu_delete($args = array()) {
-  menu_link_delete($args['mlid']);
-  _taxonomy_menu_delete_item($args['vid'], $args['tid']);
+function taxonomy_menu_taxonomy_menu_delete(&$item) {
+  menu_link_delete($item['mlid']);
+  _taxonomy_menu_delete_item($item['vid'], $item['tid']);
 }
 
 /**
@@ -672,7 +672,7 @@
  * @param $item
  * @return unknown_type
  */
-function _taxonomy_menu_item($item) {
+function _taxonomy_menu_item(&$item) {
   //if tid is 0 then do not chagne any settings
   if ($item['tid'] > 0) {
     //get the number of node attached to this term
@@ -696,8 +696,6 @@
       $item['name'] .= " ($num)";
     }
   }
-
-  return $item;
 }
 
 /**
@@ -715,8 +713,8 @@
  *
  * @return $item
  */
-function taxonomy_menu_taxonomy_menu_insert($item) {
-  return _taxonomy_menu_item($item);
+function taxonomy_menu_taxonomy_menu_insert(&$item) {
+  _taxonomy_menu_item($item);
 }
 
 /**
@@ -735,8 +733,8 @@
  *
  * @return $item
  */
-function taxonomy_menu_taxonomy_menu_update($item) {
-  return _taxonomy_menu_item($item);
+function taxonomy_menu_taxonomy_menu_update(&$item) {
+  _taxonomy_menu_item($item);
 }
 
 /**
