Fixed issues with selecting, unselecting and reselecting images.
Fixed ordering when images were unselected.