Fix IMAP tests