remove unnecessary newline character