fix location errors