Fix cursor line problem