fix problem of different newline characters