Fixed bug in queueEvent() in which prior interrupt status was not correctly restored