diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 0f44614a099e6ec955763e16ccba773162df2aae..b8f428341c5a9686d1e9db16b3609b7ab60fff6b 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -396,8 +396,6 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
     {
         $this->checkPiwikIsNotInstalled();
 
-        $this->markInstallationAsCompleted();
-
         $view = new View(
             '@Installation/finished',
             $this->getInstallationSteps(),
@@ -424,6 +422,8 @@ class Controller extends \Piwik\Plugin\ControllerAdmin
                  */
                 Piwik::postEvent('Installation.defaultSettingsForm.submit', array($form));
 
+                $this->markInstallationAsCompleted();
+
                 Url::redirectToUrl('index.php');
             } catch (Exception $e) {
                 $view->errorMessage = $e->getMessage();