Encryption: minor fixes