--- site_map.module.0	2006-10-25 03:34:56.000000000 -0500
+++ site_map.module	2007-01-11 10:22:12.000000000 -0600
@@ -116,7 +116,7 @@ function site_map_settings() {
     '#default_value' => variable_get('site_map_categories_depth', 'all'),
     '#size' => 3,
     '#maxlength' => 10,
-    '#description' => t('Specify how many subcategories should be included on the categorie page.  Enter "all" to include all subcategories or "0" to include no subcategories.'),
+    '#description' => t('Specify how many subcategories should be included on the categorie page.  Enter "all" to include all subcategories,"0" to include no subcategories, or "-1" not to append the depth at all.'),
   );
 
   $form['site_map_rss_options'] = array(
@@ -371,7 +371,7 @@ function _site_map_taxonomy_tree($vid, $
     $rss_depth = 'all';
   }
   $cat_depth = variable_get('site_map_categories_depth', 'all');
-  if (!is_numeric($cat_depth) || $cat_depth < 0) {
+  if (!is_numeric($cat_depth)) {
     $cat_depth = 'all';
   }
 
@@ -402,7 +402,11 @@ function _site_map_taxonomy_tree($vid, $
     $output .= '<li>';
     $term->count = taxonomy_term_count_nodes($term->tid);
     if ($term->count) {
-      $output .= l($term->name, "taxonomy/term/$term->tid/$cat_depth", array('title' => $term->description));
+      if ($cat_depth < 0) {
+       $output .= l($term->name, "taxonomy/term/$term->tid", array('title' => $term->description));   
+      } else {
+       $output .= l($term->name, "taxonomy/term/$term->tid/$cat_depth", array('title' => $term->description)); 
+      } 
     }
     else {
        $output .= check_plain($term->name);
@@ -430,4 +434,4 @@ function _site_map_taxonomy_tree($vid, $
   return $output;
 }
 
-?>
\ No newline at end of file
+?>
