Bug fixes for PGP/MIME encryption