Fixed nested destroy bug