diff --git a/Program.cs b/Program.cs
index a031a583..41fadc04 100644
--- a/Program.cs
+++ b/Program.cs
@@ -68,12 +68,12 @@ private static void Main(){
                 #endif
             });
 
-            Application.Run(new FormBrowser());
-
             Application.ApplicationExit += (sender, args) => {
                 UserConfig.Save();
                 Cef.Shutdown();
             };
+
+            Application.Run(new FormBrowser());
         }
     }
 }