fixing geoindex logic