fix state exit functionality not being run in inventory

right click to exit inventory circumvented the functionality hooked to the
OK button