modified so that provider is not retired if provider type set to null