Registration, KEK generation bug fixes