remove trailing commas