Index: /trunk/roundcubemail/program/js/app.js
===================================================================
--- /trunk/roundcubemail/program/js/app.js	(revision 1916)
+++ /trunk/roundcubemail/program/js/app.js	(revision 1917)
@@ -2113,5 +2113,5 @@
 	if (this.env.signatures[id])
 	  {
-	  newsig = this.env.signatures[id]['text'];
+	  newsig = String(this.env.signatures[id]['text']).replace("\n", "\r\n");
 	  htmlsig = this.env.signatures[id]['is_html'];
 	  }
@@ -3829,5 +3829,5 @@
       case 'list':
         if (this.task == 'mail') {
-          if (this.message_list)
+          if (this.message_list && request_obj.__action == 'list')
             this.msglist_select(this.message_list);
           this.enable_command('show', 'expunge', 'select-all', 'select-none', 'sort', (this.env.messagecount > 0));
@@ -3836,4 +3836,5 @@
         else if (this.task == 'addressbook')
           this.enable_command('export', (this.contact_list && this.contact_list.rowcount > 0));
+
         break;
       }
Index: /trunk/roundcubemail/program/steps/mail/getunread.inc
===================================================================
--- /trunk/roundcubemail/program/steps/mail/getunread.inc	(revision 1916)
+++ /trunk/roundcubemail/program/steps/mail/getunread.inc	(revision 1917)
@@ -24,6 +24,7 @@
 if (!empty($a_folders))
 {
+  $inbox = ($IMAP->get_mailbox_name() == 'INBOX');
   foreach ($a_folders as $mbox_row)
-    $OUTPUT->command('set_unread_count', $mbox_row, $IMAP->messagecount($mbox_row, 'UNSEEN'), ($IMAP->get_mailbox_name() == 'INBOX' && $mbox_row == 'INBOX'));
+    $OUTPUT->command('set_unread_count', $mbox_row, $IMAP->messagecount($mbox_row, 'UNSEEN'), $inbox && $mbox_row == 'INBOX');
 }
 
