fix newline problem with piping to sed