irq potential integer wrapping fix