fix ungroup bug