fix caret selection