fixed restoreIRQ() only once