fix a bug for selecting the group when editing