more bug fixes for the pgp problem