remove duplicated newline