few fixes on the registry and setup