diff --git a/src/aven.cc b/src/aven.cc
index 8718335e..c5cdf56b 100644
--- a/src/aven.cc
+++ b/src/aven.cc
@@ -355,11 +355,6 @@ bool Aven::OnInit()
     // Create the main window.
     m_Frame = new MainFrm(APP_NAME, pos, wxSize(width, height));
 
-    // Select maximised if that's the saved state.
-    if (maximized) {
-	m_Frame->Maximize();
-    }
-
     if (utf8_argv[optind]) {
 	if (!opt_survey) opt_survey = "";
 	m_Frame->OpenFile(fnm, wxString(opt_survey, wxConvUTF8));
@@ -371,6 +366,10 @@ bool Aven::OnInit()
     }
 
     m_Frame->Show(true);
+    // Select maximised if that's the saved state.
+    if (maximized) {
+	m_Frame->Maximize();
+    }
 #ifdef _WIN32
     m_Frame->SetFocus();
 #endif
