Fix a typo in rebalanceGroups()