diff --git a/lib/base.php b/lib/base.php
index 803c0118e20f882345696e5617b82c075e2b7a98..7b42d56f522d3dd712019368924bb9eb1afa8679 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -156,6 +156,7 @@ class OC{
 		$currentVersion=implode('.',OC_Util::getVersion());
 		if (version_compare($currentVersion, $installedVersion, '>')) {
 			OC_DB::updateDbFromStructure('../db_structure.xml');
+			OC_Config::setValue('version',implode('.',OC_Util::getVersion()));
 		}
 
 		ini_set('session.cookie_httponly','1;');