Fixed a possible issue of inventories losing owners