fix bug for search functions based on current location