Fixed a bug of main window width