             case .Completed: self._self.dispose()
             }
             
-            if switchState.latest != self.id {
+            if parent.latest != self.id {
                 return
             }
            

            
            switch event {
            case .Next:
                trySend(observer, event)
            case .Error:
                trySend(observer, event)
                self.parent.dispose()
            case .Completed:
                parent.switchState.hasLatest = false
                if switchState.stopped {
                    trySend(observer, event)
                    self.parent.dispose()
                }
            }

    
    func on(event: Event<Element>) {
        return parent.lock.calculateLocked {
            
            switch event {
            case .Next: break
