Removes extra commas to make the json validate