Bugfix: Caret not moving while typing in some cases