     
     @IBAction func cancelPressed(_ sender: AnyObject) {
         self.bluepeerObject?.disconnectSession()
-        self.dismiss(animated: true, completion: nil)
+        self.dismiss(animated: true, completion: {
+            self.browserCompletionBlock?(false)
+        })
     }
     
     func timerFired(_ timer: Timer) {

    
    override open func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
//        let popoverPresentationVC = self.parentViewController?.popoverPresentationController
//        if (popoverPresentationVC != nil && UIPopoverArrowDirection.Unknown.rawValue > popoverPresentationVC!.arrowDirection.rawValue) {
//            self.navigationItem.setLeftBarButtonItem(nil, animated: false)
//        } else {
//            // presented as modal view controller (on iPhone)
//        }
    }
    
    override open func viewWillDisappear(_ animated: Bool) {

    
    override open func viewDidLoad() {
        super.viewDidLoad()
        self.setNeedsStatusBarAppearanceUpdate()
        guard let bo = bluepeerObject else {
            assert(false, "ERROR: set bluepeerObject before loading view")
            return
