Inventory bug fix