why is this converted to inject by name instead of type?