 // MARK: - queues
 
 extension NextLevel {
-    
+
     internal func executeClosureAsyncOnMainQueueIfNecessary(withClosure closure: @escaping () -> Void) {
         DispatchQueue.main.async(execute: closure)
     }
 
+    internal func executeClosureSyncOnMainQueue(withClosure closure: @escaping () -> Void) {
+        DispatchQueue.main.sync(execute: closure)
+    }
+    
     internal func executeClosureAsyncOnSessionQueueIfNecessary(withClosure closure: @escaping () -> Void) {
         self._sessionQueue.async(execute: closure)
     }

                    
                    session.endClip(completionHandler: { (sessionClip: NextLevelClip?, error: Error?) in
                        if let clip = sessionClip {
                            self.videoDelegate?.nextLevel(self, didCompleteClip: clip, inSession: session)
                            if let handler = completionHandler {
                                handler()
                            }

                    // process frame
                    self._lastVideoFrameTimeInterval = CACurrentMediaTime()
                    if success == true {
                        self.executeClosureSyncOnMainQueue {
                            self.videoDelegate?.nextLevel(self, didAppendVideoSampleBuffer: sampleBuffer, inSession: session)
                        }
                        self.checkSessionDuration()
                    } else {
                        self.executeClosureSyncOnMainQueue {
                            self.videoDelegate?.nextLevel(self, didSkipVideoSampleBuffer: sampleBuffer, inSession: session)
                        }
                    }
