Fixing "confirm exit?" action (it used to hang if No was pressed).