partially fix caret positioning