Fixed overflow in one of the arrays during generation. Fixed bug #1.