Index: nat.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nat/nat.module,v
retrieving revision 1.35
diff -u -r1.35 nat.module
--- nat.module	10 Nov 2008 19:37:47 -0000	1.35
+++ nat.module	11 Feb 2009 02:16:14 -0000
@@ -72,7 +72,7 @@
     'path' => drupal_get_path('module', 'nat') .'/includes',
   );
 }
-		
+
 /**
  * Implementation of hook_perm().
  */
@@ -634,7 +634,16 @@
       $edit['parent'] = $hierarchy[$term->vid];
     }
     else {
-      $edit['parent'] = array();
+      // Find term parents
+      $parents = taxonomy_get_parents($term->tid);
+      if(count($parents)) {
+        // Preserves term's parent if it exists
+        $parent = current($parents);
+        $edit['parent'] = array($parent->tid => $parent->tid);
+      }
+      else {
+        $edit['parent'] = array();
+      }
     }
 
     if (count($relations)) {

