Fixed the decryption routines

Actually works as intended now...