fix bugs with edit current line