           options.push option for option in @getOptions(i, optionsKeys)
           disabled = @getDisabledAttribute(i)
           selectedOption = if @state.selectedOptions[i]?.value then @state.selectedOptions[i] else null
-          optionsKeys.push selectedOption.value if selectedOption?.value
+          optionsKeys[select.id] = selectedOption.value if selectedOption?.value
           <div id={select.id} key={select.id}>
             {if select.title isnt @props.task.instruction
               <div>{select.title}</div>}

    @menus[0].focus()

  getOptions: (i, optionsKeys) ->
    optionsKey = if optionsKeys.length then optionsKeys.join(';') else '*'
    select = @props.task.selects[i]
    options = select.options[optionsKey]
    if options then options else []

  getDisabledAttribute: (i) ->
    {selects} = @props.task
    select = selects[i]
    optionsKeys = (o.value for o in @state.selectedOptions.slice(0,i))
    [condition] = selects.filter (filterSelect) => filterSelect.id is select.condition
    conditionIndex = selects.indexOf(condition)


    annotationValues = @props.annotation.value
    unless annotationValues.length
      @props.annotation.value = @props.task.selects.map -> {value: null, option: false}
      @syncAnnotations()

    if @props.autoFocus is true
      @handleFocus()
