diff --git a/core/ajax/update.php b/core/ajax/update.php
index 9d0c6f89f1bafed35fdc112ff8e56e81476b9887..af469237a185a209fe0798a3f747d7309f9817ad 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -11,7 +11,7 @@ if (OC::checkUpgrade(false)) {
 	$watcher = new UpdateWatcher($updateEventSource);
 	OC_Hook::connect('update', 'success', $watcher, 'success');
 	OC_Hook::connect('update', 'error', $watcher, 'error');
-	OC_Hook::connect('update', 'error', $watcher, 'failure');
+	OC_Hook::connect('update', 'failure', $watcher, 'failure');
 	$watcher->success('Turned on maintenance mode');
 	try {
 		$result = OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/db_structure.xml');