fix bug caret after change font