fix trailing comma in array