Fixing registry creation code.