remove trailing comas to improve compatibility