Remove invalid trailing commas