Fixed Encryption Bug