Fix bug in inventory transfer