Fix crash when remove of collection.