Fix integer overflow in demo page.