     @props.task.questionsMap = newTask.questionsMap
     @props.task.questionsOrder = newTask.questionsOrder
 
-    @props.workflow.update('tasks').save()
+    @props.onChange @props.task
       .then =>
         @clearState()
 

  handleImageAdd: (media) ->
    @setState resettingFiles: true
    @props.task.images[media.metadata.filename] = media.src
    @props.workflow.update('tasks').save()
      .then =>
        @setState resettingFiles: false

  handleImageDelete: (media) ->
    @setState resettingFiles: true
    delete @props.task.images[media.metadata.filename]
    @props.workflow.update('tasks').save()
      .then =>
        @setState resettingFiles: false


        questionsOrder: []
        questions: {}
        questionsMap: {}
      @props.onChange @props.task
      @clearState()

  resetMedia: (e) ->
