diff --git a/Source/MainWindow.cpp b/Source/MainWindow.cpp
index d968d26dcbedfd16d8763acfec6b5ac53d2ad048..fb6729bd38325f7a39dec2a529cfa14143c9a6b5 100644
--- a/Source/MainWindow.cpp
+++ b/Source/MainWindow.cpp
@@ -113,6 +113,10 @@ void MainWindow::saveWindowBounds()
 
     XmlElement* xml = new XmlElement("MAINWINDOW");
 
+    xml->setAttribute("version", JUCEApplication::getInstance()->getApplicationVersion());
+
+    JUCEApplication::getInstance()->systemRequestedQuit();
+
     XmlElement* bounds = new XmlElement("BOUNDS");
     bounds->setAttribute("x",getScreenX());
     bounds->setAttribute("y",getScreenY());
diff --git a/Source/UI/EditorViewport.cpp b/Source/UI/EditorViewport.cpp
index e572998174c7097e710d7e3617a02e727c291d3e..36d11a17f8737d1cd79081d1bcb0b109fbc90876 100755
--- a/Source/UI/EditorViewport.cpp
+++ b/Source/UI/EditorViewport.cpp
@@ -1178,7 +1178,7 @@ const String EditorViewport::saveState(File fileToUse)
     XmlElement* info = xml->createNewChildElement("INFO");
 
     XmlElement* version = info->createNewChildElement("VERSION");
-    version->addTextElement("0.1");
+    version->addTextElement(JUCEApplication::getInstance()->getApplicationVersion());
 
     Time currentTime = Time::getCurrentTime();