FS-13 FS-9 Fixed some wrong checks in the EncryptionManager