fixed a problem with detectProviderFromSegments