     (core setAutoShutter (@state :init-auto-shutter))
     (set-exposure (core getCameraDevice) (@state :init-exposure))
     (set-stage-position (@state :default-z-drive) (@state :init-z-position))
+    (when-let [state (@state :init-shutter-state)]
+      (set-shutter-open state))
     (when (and (@state :init-continuous-focus)
                (not (core isContinuousFocusEnabled)))
       (core enableContinuousFocus true))

    (let [xy (.getXYStagePosition gui)]
      [(.x xy) (.y xy)])))

(defn set-z-stage-position [stage pos]
  (when (and (@state :init-continuous-focus)
             (not (core isContinuousFocusDrive stage))

      :init-continuous-focus (core isContinuousFocusEnabled)
      :init-width (core getImageWidth)
      :init-height (core getImageHeight)
      :init-shutter-state (when-not (empty? (core getShutterDevice)) (core getShutterOpen))
      :binning (core getProperty (core getCameraDevice) "Binning")
      :bit-depth (core getImageBitDepth)
      :pixel-size-um (core getPixelSizeUm)
