             SettingSection(title: NSAttributedString(string: Strings.Security.uppercased()), children:
                 [BoolSetting(prefs: prefs, prefKey: kPrefKeyBrowserLock, defaultValue: false, titleText: Strings.Browser_Lock, statusText: nil, settingDidChange: { isOn in
                     if isOn {
-                        if KeychainWrapper.pinLockInfo() == nil {
+                        if KeychainWrapper.pinLockInfo() == nil || !(prefs.boolForKey(kPrefKeySetBrowserLock) ?? false) {
                             let view = PinViewController()
                             view.delegate = weakSelf
                             weakSelf?.navigationController?.pushViewController(view, animated: true)

            profile.prefs.setBool(false, forKey: kPrefKeyBrowserLock)
            tableView.reloadData()
        }
    }
}


let kPrefKeyFingerprintProtection = "fingerprintprotection_on"
let kPrefKeyPrivateBrowsingAlwaysOn = "privateBrowsingAlwaysOn"
let kPrefKeyBrowserLock = "browserLock"
let kPrefKeySetBrowserLock = "setBrowserLockPin"

class BraveSettingsView : AppSettingsTableViewController {

