     dialog.classList.add 'failed'
     dialog.querySelector('h3').textContent = "Failed"
     dialog.querySelector('figure').remove()
-    dialog.appendChild("
+    dialog.appendChild(Written.toHTML("
       <section>
         <p>An error occured while trying to process your image.</p>
         <button>Close</button>
       </section>
-    ".toHTML())
+    "))
     dialog.querySelector('button').addEventListener('click', @cancel)
 
   upload: (e) =>

    @node.querySelector('img').addEventListener 'click', @select.bind(this, @node)

  template: ->
    "<div id='WrittenOverlay' contenteditable=false>
        <div id='WrittenDialog'>
          <header>
            <div class='progress'></div>

          </figure>
        </div>
      </div>
      ")

  select: (node) =>
    @selection = @getSelection()
