Index: /branches/devel-vnext/program/steps/mail/func.inc
===================================================================
--- /branches/devel-vnext/program/steps/mail/func.inc	(revision 624)
+++ /branches/devel-vnext/program/steps/mail/func.inc	(revision 625)
@@ -291,11 +291,19 @@
                     $js_name,
                     $title,
-                    rc_main::Q($foldername));
-
+                    rc_main::Q($foldername)
+        );
+        /**
+         * Close <li> Element.
+         */
+        $out .= "</li>\n";
+
+        /**
+         * Append a new list if it has subfolders.
+         */
         if (!empty($folder['folders'])) {
             $out .= "\n<ul>\n";
             $out .= rcmail_render_folder_tree_html($folder['folders'], $special, $mbox_name, $maxlength, $nestLevel+1) . "</ul>\n";
         }
-        $out .= "</li>\n";
+
         $idx++;
     }
