   destroy: ->
     super()
     @castButton.off 'click', @onCastButtonClick
+    @castOptions.find('a').off 'click', @onCastOptionsClick
+    @onCastOptionsClick = null

  onCastButtonClick: (e) ->
    Backbone.Mediator.publish 'tome:manual-cast', {}

  onCastOptionsClick: (e) ->
    Backbone.Mediator.publish 'focus-editor'
    @castButtonGroup.removeClass 'open'
    @setAutocastDelay $(e.target).attr 'data-delay'

    @castButtonGroup = $('.cast-button-group', @$el)
    @castOptions = $('.autocast-delays', @$el)
    @castButton.on 'click', @onCastButtonClick
    @castOptions.find('a').on 'click', @onCastOptionsClick
    # TODO: use a User setting instead of localStorage
    delay = localStorage.getItem 'autocastDelay'
    delay ?= 5000
