avoid removing necessary commas when replacing version