remove duplicating newline character