Added correct conditional for location