     self.useInteractiveZsh = config.useInteractiveZsh
     self.nvimArgs = config.nvimArgs ?? []
     self.cwd = config.cwd
+
+    self.scheduler = SerialDispatchQueueScheduler(queue: self.queue,
+                                                  internalSerialQueueName: "com.qvacua.NvimView.UiBridge")
+
+    self.client.queue = self.queue
+    self.server.queue = self.queue
 
     self.server.stream
       .subscribe(onNext: { message in
         self.handleMessage(msgId: message.msgid, data: message.data)
       }, onError: { error in
-        self.logger.error("There wsa an error on the local message port server: \(error)")
+        self.logger.error("There was an error on the local message port server: \(error)")
         self.streamSubject.onError(Error.ipc(error))
       })
       .disposed(by: self.disposeBag)

    return self.server
      .run(as: self.localServerName)
      .andThen(Completable.create { completable in
        self.launchNvimUsingLoginShell()

        let deadline = Date().addingTimeInterval(timeout)
        self.nvimReadyCondition.lock()
        defer { self.nvimReadyCondition.unlock() }
        while !self.isNvimReady && self.nvimReadyCondition.wait(until: deadline) {}

        if self.isNvimReady {
          self.streamSubject.onNext(.ready)
          if self.isInitErrorPresent {
            self.streamSubject.onNext(.initVimError)
          }
          completable(.completed)
        } else {
          self.streamSubject.onError(Error.launchNvim)
          completable(.error(Error.launchNvim))
        }

        return Disposables.create()
      })
  }

  func vimInput(_ str: String) -> Completable {

  private var nvimServerProc: Process?

  private var isNvimReady = false

  private var initialWidth = 40
  private var initialHeight = 20

  private var runLocalServerAndNvimCompletable: Completable.CompletableObserver?

  private let streamSubject = PublishSubject<Message>()
  private let disposeBag = DisposeBag()
