Added rebalancing of node IDs