           recordingDelegate: self
         )
 
-        self.hideActivity()
+        DispatchQueue.main.async {
+          self.hideActivity()
+        }
       }
     }
   }
 
   func endRecording() {
+    showActivity()
+
     cameraOutput.stopRecording()
     screenOutput.stopRecording()
 

  }

  fileprivate func safeVideo(cameraVideoURL: URL, screenVideoURL: URL) {
    showActivity()
    NSLog("Start exporting camera: \(cameraVideoURL), screen: \(screenVideoURL)")

    precondition(activeExporter == nil, "An export is already in progress.")

  }

  func hideActivity() {
    activityIndicator.stopAnimation(.none)
    recordButton.alphaValue = 1.0
  }

  override func viewDidLoad() {
