Bug fix, expands groups before destroying them