Fix can build main build when destroyed.