fix show hide main window