Added a check so that the image will never be the same