diff --git a/site_map.module b/site_map.module
old mode 100644
new mode 100755
index fe1756e..0ffd0d0
--- a/site_map.module
+++ b/site_map.module
@@ -513,7 +513,7 @@ function _site_map_taxonomy_tree($vid, $name = NULL, $description = NULL) {
$output .= !empty($description) ? '
' . filter_xss_admin($description) . "
\n" : '';
// taxonomy_get_tree() honors access controls.
- $tree = taxonomy_get_tree($vid);
+ $tree = taxonomy_get_tree($vid,0,variable_get('site_map_categories_depth', NULL));
foreach ($tree as $term) {
$term->count = site_map_taxonomy_term_count_nodes($term->tid);
if ($term->count <= $threshold) {