fix_caret_bugs