--- /Library/WebServer/Documents/drupal/modules/comment.module	2006-04-24 14:42:53.000000000 -0400
+++ comment.module	2006-04-27 22:05:33.000000000 -0400
@@ -846,7 +846,6 @@
       if (db_num_rows($result) && (variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_ABOVE || variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_ABOVE_BELOW)) {
         $output .= comment_controls($mode, $order, $comments_per_page);
       }
-
       while ($comment = db_fetch_object($result)) {
         $comment = drupal_unpack($comment);
         $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
@@ -873,6 +872,7 @@
       if (db_num_rows($result) && (variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_BELOW || variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_ABOVE_BELOW)) {
         $output .= comment_controls($mode, $order, $comments_per_page);
       }
+      
     }
 
     // If enabled, show new comment form.
@@ -880,6 +880,11 @@
       $output .= comment_form(array('nid' => $nid), t('Post new comment'));
     }
   }
+
+  if (db_num_rows($result) > 0) {
+    $output = theme('comment_wrapper', $output );
+  }
+  
   return $output;
 }
 
