Fix end of line selection issue