Fixed an error with group removal.