         logger.error("Can't find content for page " + href)
         return undefined
 
-    mod = data.getElementsByClassName('modified')
-    for m in mod
-        m.parentElement.removeChild(m)
+    while true
+        mod = data.getElementsByClassName('modified')
+        if mod.length == 0
+            break
+        mod[0].parentElement.removeChild(mod[0])
 
     return data.innerHTML
 

        @addNews(headerText, element)

    parseSection: (section, id) ->
        hidden = section.getElementsByClassName('algoprog-hidden')
        for h in hidden
            h.parentElement.removeChild(h)

        news = section.getElementsByClassName('algoprog-news')
        for h in news
            @parseNews(h)
            h.parentElement.removeChild(h)

        activities = section.getElementsByClassName('activity')
        materials = []

    return materials

getIndent = (activity) ->
    indent = 0
    while true
        spacers = activity.getElementsByClassName('spacer')
        if spacers.length == 0
            break
        spacers[0].parentElement.removeChild(spacers[0])
    if indent > 0
        indent -= 20
    return indent
