fixed the bugs related to group