add closing all windows and widgets when exit