diff --git a/nice_menus.module b/nice_menus.module
index 52bd94d..702c06b 100644
--- a/nice_menus.module
+++ b/nice_menus.module
@@ -363,6 +363,9 @@ function theme_nice_menus_tree($variables) {
     i18nmenu_localize_tree($menu);
   }
 
+  // Assume depth == 0 by default, overriden if mlid is specified.
+  $parent_depth = 0;
+
   // For custom $menus and menus built all the way from the top-level we
   // don't need to "create" the specific sub-menu and we need to get the title
   // from the $menu_name since there is no "parent item" array.
