remove trailing commas on single element arr