fixed bug with serializing EncryptionResult