revise caret behavior #331