Fix detach order: We have to unhook the interrupt first and leave the