Fixed decryption.
Check validity of the message before decryption.