 
 parseActivity = (activity, order, keepResourcesInTree) ->
     if activity.classList.contains("label")
-        return parseLabel(activity, order)
+        return parseLabel(activity, order, keepResourcesInTree)
     else if activity.classList.contains("resource")
         return parseResource(activity, order, keepResourcesInTree)
     else if activity.classList.contains("statements")

            materials: []
    else
        material = new Material
            _id: activity.id,
            order: order,
            type: "page",
            indent: indent


downloadAndParse = (href) ->
    jar = request.jar()
    try
        page = await request
            url: href
            jar: jar
    catch
        logger.info "Error donloading " + href + " will re-download"
        page = await request
            url: href
            jar: jar
    document = (new JSDOM(page, {url: href})).window.document
    return document

