 
         let cancelAction = UIAlertAction(title: "Cancel", style: .cancel, handler: nil)
 
-        alertController.addAction(scanQRCodeAction)
-        alertController.addAction(enterManuallyAction)
-        alertController.addAction(cancelAction)
+        addAccountAlertController.addAction(scanQRCodeAction)
+        addAccountAlertController.addAction(enterManuallyAction)
+        addAccountAlertController.addAction(cancelAction)
 
         let updater = AccountsTableViewUpdater(tableView: tableView)
         updater.startUpdating()

    }

    @IBAction func addAccount(_ sender: Any) {
        present(alertController, animated: true, completion: nil)
    }

    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {

            navigationItem.searchController = searchController
        }

        addAccountAlertController = UIAlertController(
            title: "Add Account",
            message: "Add an account by scanning a QR code or enter a secret manually.",
            preferredStyle: .actionSheet)
