Fix a range selection issue involves image