small fix in new text selection code