             } else {
                 DLog("%@", "not connected to \(session.hashValue)")
                 // If self is disconnected or current host is disconnected
-                session.disconnect()
+                print("passed in \(session.connectedPeers)")
+                print("self: \(self.session.connectedPeers)")
+                print(session == self.session)
+//                session.disconnect()
+                
                 if self.host == peerID {
                     DLog("%@", "Host was removed")
-//                    session.disconnect()
+                    
+                    dispatch_sync(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) {
+                        self.session.disconnect()
+                    }
+//                    browser(serviceBrowser!, lostPeer: peerID)
+//                    setUpSession()
                     delegate?.disconnectedFromSession()
                 }
             }

    public var debugMode = false
    public var autoAcceptGuests = true
    
    static let defaultTimeout: NSTimeInterval = 30
    private var serviceAdvertiser: MCNearbyServiceAdvertiser?
    private var serviceBrowser: MCNearbyServiceBrowser?
    private var foundHosts = [MCPeerID]()

    // Disconnect from current session, browse for another host
    public func disconnect() {
        session.disconnect()
        host = nil
        DLog("%@", "disconnected from \(session.hashValue)")
    }
    
