diff --git a/main.qml b/main.qml
index 5a6bcabb..a4a91a50 100644
--- a/main.qml
+++ b/main.qml
@@ -144,7 +144,8 @@ ApplicationWindow {
         // basicPanel.paymentClicked.connect(handlePayment);
 
         // currentWallet is defined on daemon address change - close/reopen
-        if (currentWallet !== undefined) {
+        // TODO: strict comparison here (!==) causes crash after passwordDialog on previously crashed unsynced wallets
+        if (currentWallet != undefined) {
             console.log("closing currentWallet")
             walletManager.closeWallet(currentWallet);
         }
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
index 78a8ea06..097fb58a 100644
--- a/wizard/WizardMain.qml
+++ b/wizard/WizardMain.qml
@@ -137,7 +137,7 @@ Rectangle {
         appWindow.persistentSettings.auto_donations_amount = settings.auto_donations_amount
         appWindow.persistentSettings.daemon_address = settings.daemon_address
         appWindow.persistentSettings.testnet = settings.testnet
-        appWindow.persistentSettings.restore_height = parseInt(settings.restore_height)
+        appWindow.persistentSettings.restore_height = (isNaN(settings.restore_height))? 0 : settings.restore_height
         appWindow.persistentSettings.is_recovering = (settings.is_recovering === undefined)? false : settings.is_recovering
 
     }