Fix while loop iterator incorrect count 

The while loop is repeated 100 times not 99 times. 0~99 inclusive.