remove the needless last commas before closing map