remove extra trailing commas