Fixed bug in Encryption