Fix check for incorrect location name.