Fix typeregistry autowiring