fixed subgroup bug