cancel action on opening inventory or stats screen.

fixes some associated bugs.
Merge pull request #1 from SupSuper/master

cancel action on opening inventory or stats screen.