Added check for irq stack