Fix for dependent destroy bug.