Resizing main window on open