Fix for range counts and default to sort by index for facets