Fixed generation of JSON for groups. Comma was missing for multiple items