Fixed selection issue with overlapping consecutive selections.