Fixes legacy dialog .destroy issues
Allows people to click tree to close dialogs