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

            //    photoDict[NextLevelPhotoThumbnailKey] = tData
            //}
            
            self.executeClosureAsyncOnMainQueueIfNecessary {
                self.videoDelegate?.nextLevel(self, didCompletePhotoCaptureFromVideoFrame: photoDict)
            }


                self.executeClosureAsyncOnSessionQueueIfNecessary {
                    session.endClip(completionHandler: { (sessionClip: NextLevelClip?, error: Error?) in
                        if let clip = sessionClip {
                            self.executeClosureSyncOnMainQueue {
                                self.videoDelegate?.nextLevel(self, didCompleteClip: clip, inSession: session)
                            }
                        } else if let _ = error {
                            // TODO report error
                        }
                        self.executeClosureSyncOnMainQueue {
                            self.videoDelegate?.nextLevel(self, didCompleteSession: session)
                        }
                    })
                }
            }
