fixed cursor position change (with Brett's help ;) )