Fix issue when adding groups