Fix possible error in storeSettings.