caret position correction
Merge pull request #140 from Eliak/patch-2

caret position correction