         for i in [(e.length - 1)..(e.selectedIndex)] by -1
           o = options[i]
           if o.selected
-            select.remove i
+            e.remove i
             movers.unshift o
 
         return movers


      constructor: (id) ->
        @selected = (dom id)
        container = @selected.findContainer ".t-palette"
        @available = container.findFirst ".t-palette-available select"
        @hidden = container.findFirst "input[type=hidden]"

        @select = container.findFirst "[data-action=select]"
        @deselect = container.findFirst "[data-action=deselect]"

        @moveUp = container.findFirst "[data-action=move-up]"
        @moveDown = container.findFirst "[data-action=move-down]"

        # Track where reorder is allowed based on whether the buttons actually exist
        @reorder = @moveUp isnt null

        if @reorder
          @moveUp.disabled = nothingSelected or @allSelectionsAtTop()
          @moveDown.disabled = nothingSelected or @allSelectionsAtBottom()

      doSelect: -> @transferOptions @available, @selected, @reorder

      doDeselect: -> @transferOptions @selected, @available, false

      transferOptions: (from, to, atEnd) ->
        if from.element.selectedIndex is -1
