fix Encryption errors