Sort by distance now working.