     selectedOptions[i] = option
     value = @props.annotation.value
 
-    optionsKeys = (o.value for o in selectedOptions.slice(0,i))
+    optionsKeys = {}
+    selectedOptions.slice(0,i).map (option, j) => optionsKeys[@props.task.selects[j].id] = option.value if option?.value
     options = @getOptions(i, optionsKeys)
     newIndex = options?.indexOf(option)
     if newIndex is -1 or newIndex is undefined


  render: ->
    {selects} = @props.task
    optionsKeys = []

    <GenericTask question={@props.task.instruction} help={@props.task.help} required={@props.task.required}>
      <div>

          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[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>}
