       return
     }
 
+    let rects = self.rectsMarkedForRender
+    self.rectsMarkedForRender.removeAll()
+
     DispatchUtils.gui {
-      self.rectsMarkedForRender.forEach(self.setNeedsDisplay)
-      self.rectsMarkedForRender.removeAll()
+      rects.forEach(self.setNeedsDisplay)
     }
   }
 
   public func updateForeground(_ fg: Int32) {
-    DispatchUtils.gui {
       self.grid.foreground = UInt32(bitPattern: fg)
 //      NSLog("\(ColorUtils.colorIgnoringAlpha(UInt32(fg)))")
-    }
   }
 
   public func updateBackground(_ bg: Int32) {
-    DispatchUtils.gui {
       self.grid.background = UInt32(bitPattern: bg)
       self.layer?.backgroundColor = ColorUtils.colorIgnoringAlpha(self.grid.background).cgColor
 //      NSLog("\(ColorUtils.colorIgnoringAlpha(UInt32(bg)))")
-    }
   }
 
   public func updateSpecial(_ sp: Int32) {
-    NSLog("\(Thread.current)")
-    DispatchUtils.gui {
       self.grid.special = UInt32(bitPattern: sp)
-    }
   }
 
   public func suspend() {

                          left: putPosition.column,
                          right: self.grid.region.right)
      self.markForRender(region: region)
    }
  }

  public func gotoPosition(_ position: Position, screenCursor: Position, currentPosition: Position) {
    DispatchUtils.gui {
      self.currentPosition = currentPosition
//      NSLog("\(#function): \(position), \(screenCursor)")


      }

      self.updateCursorWhenPutting(currentPosition: curPos, screenCursor: screenCursor)
  }

  public func putMarkedText(_ markedText: String, screenCursor: Position) {
      NSLog("\(#function): '\(markedText)' -> \(screenCursor)")

      let curPos = self.grid.putPosition
