fix inventory bugs