Fixed HIndex long overflow bug revealed by performance test.