Fixed error when new image not selected