fix geosearch function