fix decrypting from loaded state or key/scr