Fix integer overflow in demo code.