fixed error with regexes in location