Overflow cases must be taken into account