kind of fix the problem where cursor left behind a line