key provisioning fixes