index search by distance fix