 (defn make-summary-metadata [settings]
   (let [depth (core getBytesPerPixel)
         channels (settings :channels)
-        num-camera-channels (long (core getNumberOfCameraChannels))
-        super-channels (flatten (for [channel channels] (repeat num-camera-channels channel)))]
+        num-camera-channels (core getNumberOfCameraChannels)
+        simple-channels (if-not (empty? channels) channels [{:name "Default" :color java.awt.Color/WHITE}])
+        super-channels (flatten (for [channel simple-channels] (repeat num-camera-channels channel)))]
      (JSONObject. {
       "BitDepth" (core getImageBitDepth)
       "Channels" (count super-channels)

      )))

(defn cleanup []
  (log "cleanup")
 ; (do-when #(.update %) (:display @state))
  (state-assoc! :finished true :display nil)

  (when (and (@state :init-continuous-focus)
             (not (core isContinuousFocusEnabled)))
    (core enableContinuousFocus true))
  (return-config)
    (catch Throwable t (ReportingUtils/showError t "Acquisition cleanup failed."))))

;; running events
  
