      a.push i for i in sidebarImg
 
      n = 0
-     loaded = =>
-      n++
+     check = =>
       if n is a.length
        @setFills()
+
+     loaded = ->
+      n++
+      check()
 
      for img in a
       if not img.complete

    parse: ->
     while @reader.has()
      try
       @process()
      catch e
       throw e
       #throw new Error "Line #{@reader.n + 1}: #{e.message}"

          @node.setLink @parseLink text.substr last, cur - last
          @node = @node.parent()

        when 'code'
         add()
         @addNode new Code {}
         last = i
         cur = i = text.indexOf TOKEN_MATCHES.code, i
         add()
         @node = @node.parent()
         i += TOKEN_MATCHES.code.length


      last = i

     cur = i
