Bugfix

Fixed the bug with incorrect counter value in the first call to
SubGroups