repair imap bug for find_slot