Set correct group types and correct JSON