Fixed issue with copyInventory.