remove comma from last element of map