Avoid int overflow in tests #29