fix text cursor moving left and right