Some small tweaks for pkcs11