fix overflow in another test for iteration end condition