--- menutrails.module.orig	2009-02-17 16:47:23.000000000 -0500
+++ menutrails.module	2009-02-17 16:45:40.000000000 -0500
@@ -128,8 +128,14 @@ function menutrails_node_location($node)
     $term_trails = variable_get('menutrails_terms', array());
     if (!empty($node->taxonomy)) {
       foreach ($node->taxonomy as $term) {
-        if ($term_trails[$term->tid]) {
-          $href = $term_trails[$term->tid];
+        if(is_string($term)) {
+          $tid = $term;
+        }
+        else {
+          $tid = $term->tid;
+        }         
+        if ($term_trails[$tid]) {
+          $href = $term_trails[$tid];
         }
       }
     }
@@ -341,6 +347,10 @@ function menutrails_token_values($type, 
       // Remove the node itself.
       array_pop($trail_raw);
     }
+    else {
+      $item = menutrails_node_location($node);
+      $trail_raw = drupal_map_assoc(explode('/', $item['href']));
+    }
     $trail = array();
     if (!empty($trail_raw)) {
       foreach ($trail_raw as $title) {
