diff --git a/nodehierarchy.module b/nodehierarchy.module
index 9dd6800..9a2fd25 100644
--- a/nodehierarchy.module
+++ b/nodehierarchy.module
@@ -1666,7 +1666,6 @@ function _nodehierarchy_tree_data($result, $exclude = NULL, $allowed_types, $dep
   $remnant = NULL;
   $tree = array();
   $enabled_tree = TRUE;
-  $exclude = NULL;
 
   foreach ($result as $item) {
     if ($exclude !== $item['nid']) {
