Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.312
diff -u -F^f -r1.312 taxonomy.module
--- modules/taxonomy/taxonomy.module	31 Aug 2006 21:58:36 -0000	1.312
+++ modules/taxonomy/taxonomy.module	5 Sep 2006 21:32:21 -0000
@@ -668,8 +668,20 @@ function taxonomy_form_alter($form_id, &
         $form['taxonomy'][$vocabulary->vid]['#required'] = $vocabulary->required;
       }
     }
-    if (isset($form['taxonomy'])) {
-      $form['taxonomy'] += array('#type' => 'fieldset', '#title' => t('Categories'), '#collapsible' => TRUE, '#collapsed' => FALSE, '#tree' => TRUE, '#weight' => -3);
+    if (is_array($form['taxonomy']) && !empty($form['taxonomy'])) {
+      if (count($form['taxonomy']) > 1) { // add fieldset only if form has more than 1 element.
+        $form['taxonomy'] += array(
+          '#type' => 'fieldset', 
+          '#title' => t('Categories'), 
+          '#collapsible' => TRUE, 
+          '#collapsed' => FALSE, 
+          '#tree' => TRUE, 
+          '#weight' => -3,
+        );
+      } else {
+        $form['taxonomy'] = array_shift($form['taxonomy']);	
+        $form['taxonomy']['#weight'] = -3;
+      }
     }
   }
 }
