Fixing decryption key choice to be more robust.