Only remove newline chars if they are actually present