Improve commit cf37a50

Simply, Cancel the event THEN close the inventory. How I have always done it.