Minor changes to Gpg functions