     tpl.on 'raw', (el, html) ->
         delay.call el, ->
             nextAnimationFrame ->
-                el._jquery.html(html)
+                el._jquery?.html(html)
 
     tpl.on 'show', (el) ->
         delay.call el, ->

    tpl.on 'replace', (el, tag) ->
        delay.call el, ->
            nextAnimationFrame ->
                _jquery = tag._jquery ? tag
                return unless _jquery?.length > 0
                el._jquery.replaceWith(_jquery)

                    el.jquery = _jquery

    tpl.on 'remove', (el) ->
        delay.call el.parent, ->
            el._jquery?.remove()
            delete el._jquery

    tpl.on 'end', ->
        tpl.xml._jquery = $()
