diff --git a/main.qml b/main.qml
index c09f0c3c..23bde514 100644
--- a/main.qml
+++ b/main.qml
@@ -134,6 +134,7 @@ ApplicationWindow {
 
     function openWalletFromFile(){
         persistentSettings.restore_height = 0
+        restoreHeight = 0;
         persistentSettings.is_recovering = false
         appWindow.password = ""
         fileDialog.open();
@@ -179,6 +180,7 @@ ApplicationWindow {
             console.log("using wizard wallet")
             //Set restoreHeight
             if(persistentSettings.restore_height > 0){
+                // We store restore height in own variable for performance reasons.
                 restoreHeight = persistentSettings.restore_height
             }