more imap fixes