Fix bug where selecting a non-existing item in the inventory would cause the states to stop working
fixup! Fix bug where selecting a non-existing item in the inventory would cause the states to stop working