Prevent an integer overflow