fixed some caret problem