fixed inventory hash and inventories lookup