added support for gpg encryption/fixes