Added an if statement to imageView