Fixed lost inventories on disconnect.