         imageView.filter = mainFilter
         
         mainFilter.sourceAnalayzer.addUpdateObserver { (histogram) -> Void in
-            dispatch_async(dispatch_get_main_queue(), { () -> Void in
+            self.asyncChanges({ () -> Void in
                 self.minRangeLabel.stringValue = String(format: "%2.3f", self.mainFilter.rangeSolver.minimum.z)
                 self.maxRangeLabel.stringValue = String(format: "%2.3f", self.mainFilter.rangeSolver.maximum.z)
             })
         }
         
         mainFilter.dominantAnalayzer.addUpdateObserver { (histogram) -> Void in
-            dispatch_async(dispatch_get_main_queue(), { () -> Void in
+            self.asyncChanges({ () -> Void in
                 let c = self.mainFilter.dominantSolver.color*255
                 self.dominantColorLabel.stringValue = String(format: "%3.0f,%3.0f,%3.0f:%3.0f", c.x, c.y, c.z, c.w)
-                
             })
         }
         

                if let image = IMPImage(contentsOfFile: file){
                    self.imageView.frame = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height)
                    self.imageView.source = IMPImageProvider(context: self.imageView.context, image: image)
                    dispatch_after(2, dispatch_get_main_queue()) { () -> Void in
                        self.zoomOne()
                    }
                }
            }
            else if type == .LUT {

    var is100 = false
    
    private func zoomOne(){
        is100 = false
        asyncChanges { () -> Void in
            self.scrollView.magnifyToFitRect(self.scrollView.bounds)
        }
    }
    
    private func zoom100(){
        is100 = true
        asyncChanges { () -> Void in
            self.scrollView.magnifyToFitRect(self.imageView.bounds)
        }
    }
    
    override func viewDidAppear() {
        super.viewDidAppear()
        self.zoom100()
    }
    
    override func viewDidLayout() {
        super.viewDidLayout()
        if is100 {
            self.zoom100()
        }
    }
    
