cursor position bug fixed