bugfix regarding cursor position