fix location query