Fixed a bug with the encryption of writins.