--- similarterms.old.module	2008-07-19 02:26:51.000000000 +0000
+++ similarterms.module	2008-09-18 17:00:29.000000000 +0000
@@ -27,7 +27,7 @@ function similarterms_help($path, $arg) 
 
 /**
  * Valid permissions for this module
- * @return array An array of valid permissions for the onthisdate module
+ * @return array An array of valid permissions for the similarterms module
  */
 function similarterms_perm() {
   return array('access similarterms content', 'administer similarterms content');
@@ -151,7 +151,7 @@ function similarterms_list($vocid = 0, $
       //past events
       $pasts = array();
       $types = variable_get('simterms_sametype_'. $vocid, false);
-      if (($types !== false) && is_array($types) && ($types['0'] == NULL) ) {
+      if (($types !== false) && is_array($types) && count($types) > 0 && ($types['0'] == NULL) ) {
         if ($types[1]) {
           $node_obj = node_load($nid);
           $types[1] = $node_obj->type;
