fix location parsing