Fixed major flaw in decryption code

Now entire program functions properly. Tested