Fix overflow bug in HashPagePartitionFunction