Fixing bug in getCraftableAmountFromInventory