Fix image selection bug.