             @props.tutorial.update changes
             @props.tutorial.save()
               .then =>
-                @fetchMediaFor @props.tutorial
+                @props.onChangeMedia()
       .catch (error) =>
         console.error error
 
   handleStepMediaClear: (index) ->
-    @state.media[@props.tutorial.steps[index].media]?.delete()
+    @props.media[@props.tutorial.steps[index].media]?.delete()
     changes = {}
     changes["steps.#{index}.media"] = undefined
     @props.tutorial.update changes

        project={@props.project}
        tutorial={@state.tutorial}
        media={@state.media}
        onDelete={@handleTutorialCreateOrDelete}
      />
    else
      <TutorialCreator project={@props.project} onCreate={@handleTutorialCreateOrDelete} />

  handleTutorialCreateOrDelete: ->
    @fetchTutorialFor @props.project


        <header>Media</header>
        {if @props.media?
          <div>
            <img src={@props.media.src} style={
              maxHeight: '5em'
              maxWidth: '100%'
            } />
            <button type="button" className="minor-button" onClick={@props.onMediaClear}>Clear media</button>
          </div>}
        <FileButton className="standard-button" onSelect={@handleMediaChange}>Select</FileButton>
