fix null pointer when creating a group with clients.