bug fix, move cursor position wrongly.