Fixed allocateInventory issues