Fixed some legitimate bugs in the ImapClient as well as added workarounds for GMail