       deleteMods.push({repo: repo, name: $mod.getAttribute("data-path")})
 
     $("#progress").modal({ keyboard: false, backdrop: "static" })
+    errored = false
     applyMod.applyMods(addMods, deleteMods, (done, type, mod, err) ->
       $checkbox = $("input[data-path=\"#{mod.name}\"]")
       if done

              when "en" then p.addLog("#{mod.name} - Removed Successfully")
              when "ru" then p.addLog("#{mod.name} - Удалено успешно")
      else
        switch type
          when "add"
            switch lang

              when "ru" then p.addLog("#{mod.name} - Не удалось удалить(#{err})")
      return
    ).then( ->
      if errored
        p.changePhase("done")
      else
        p.changePhase("failed")
      return
    )
  return
)
