Remove duplicated newlines