Index: vocabindex.module
===================================================================
--- vocabindex.module	(revision 69)
+++ vocabindex.module	(revision 77)
@@ -370,10 +370,21 @@
 function vocabindex_term_page($tid, $callback, $file, $filepath) {
   $term = taxonomy_get_term($tid);
   $vis = vocabindex_vi_load(VOCABINDEX_VI_PAGE);
-  foreach ($vis as $vi) {
-    if ($vi->vid == $term->vid) {
-      module_load_include('inc', 'vocabindex', 'vocabindex.view');
-      return vocabindex_view_page($tid, VOCABINDEX_TERM);
+
+  $tree = taxonomy_get_tree($term->vid, $tid, -1, 1);
+  // if flat and no terms - show nodes at this leaf term
+  if (count($tree) != 0) {
+    foreach ($vis as $vi) {
+      if ($vi->vid == $term->vid) {
+        drupal_set_title( $term->name );
+        
+        require_once($filepath .'/'. $file);
+        $arguments = array_slice(func_get_args(), 4);
+        call_user_func_array($callback, $arguments);		
+        
+        module_load_include('inc', 'vocabindex', 'vocabindex.view');
+        return vocabindex_view_page($tid, VOCABINDEX_TERM);
+      }
     }
   }
 
