Minor fixups to the crypto logic.