fix crash when remove child