Fix to groups json generation.