Fix for on_encrypted_message