   applySecondaryColor: (color) =>
     if 0 is @getConfig 'blinkInterval'
       color = @getConfig 'primaryColor'
-    else
-      color ?= @getConfig 'secondaryColor'
-    @updateStylesheet secondarySelector, 'background-color', color.toRGBAString()
-    @updateStylesheet secondarySelector, 'border-color', color.toRGBAString()
+    color = color.toRGBAString()
+    @updateStylesheet secondarySelector, 'background-color', color
+    @updateStylesheet secondarySelector, 'border-color', color
 
   applySecondaryColorAlpha: (alpha) =>
     secondaryColor = @getConfig 'secondaryColor'

    sub = null

    (interval) ->
      sub?.dispose?()
      sub = atom.workspace.observeTextEditors (editor) =>
        setTimeout =>
          editorPresenter = atom.views.getView(editor).component.presenter
          editorPresenter.stopBlinkingCursors true
          if interval > 0
            @applySecondaryColor()
            editorPresenter.cursorBlinkPeriod = interval
          else
            @applySecondaryColor()
            editorPresenter.cursorBlinkPeriod = -1 + Math.pow 2, 31
          editorPresenter.startBlinkingCursors()
        , 0

    atom.config.set "block-cursor.#{key}", value

  observeConfigs: (obj) ->
    for own key, cb of obj
      @subs.add atom.config.observe "block-cursor.#{key}", cb

module.exports = new BlockCursor()
