correction of image selection js