fixed function call to registry.register