small fix in getGroupIndexes