     @objc private dynamic var progress: Progress?
     @objc private dynamic var message: String = ""
     
-    private var finishObserver: AnyCancellable?
-    private var cancelObserver: AnyCancellable?
-    private var updateTimer: DispatchSourceTimer?
+    private var progressSubscriptions: Set<AnyCancellable> = []
+    private var completionSubscriptions: Set<AnyCancellable> = []
     
     @IBOutlet private weak var indicator: NSProgressIndicator?
     @IBOutlet private weak var descriptionField: NSTextField?

    
    
    // MARK: -
    // MARK: Lifecycle
    
    deinit {
        self.updateTimer?.cancel()
    }
    
    
    
    // MARK: View Controller Methods
    
    override func viewWillAppear() {
        
        super.viewWillAppear()
        
        self.indicator?.doubleValue = self.progress!.fractionCompleted
        self.descriptionField?.stringValue = self.progress!.localizedDescription
        
        // trigger a timer updating UI every 0.1 seconds.
        // -> This is much more performance-efficient than KV-Observing `.fractionCompleted` or `.localizedDescription`. (2018-12 macOS 10.14)
        let timer = DispatchSource.makeTimerSource(queue: .main)
        timer.schedule(deadline: .now(), repeating: .milliseconds(100), leeway: .milliseconds(50))
        timer.setEventHandler { [weak self] in self?.updateProgress() }
        timer.resume()
        self.updateTimer?.cancel()
        self.updateTimer = timer
    }
    
    
    override func dismiss(_ sender: Any?) {
        
        self.updateTimer?.cancel()
        self.updateTimer = nil
        
        // close sheet in an old way
        // -> Otherwise, a meanless empty sheet shows up after another sheet is closed
        //    if the receiver was presented and dismissed during another sheet is already presented. (2018-09 macOS 10.12)
        if let parentWindow = self.presentingViewController?.view.window,
            let sheetWindow = self.view.window,
            parentWindow.sheets.count > 1 {
            parentWindow.endSheet(sheetWindow)
        }
        
        super.dismiss(sender)
    }
    
    

        self.progress?.cancel()
    }
    
}
