hide_window: fixed bug with reopen main window
Merge branch 'hide_window'