Fix inventory to sort items by quantity.