fix inventory::use_amount crash