fixed a bug with items being added to inventories improperly