fixed refreshInventory