bug fix on removing all groups