Caret position fix