fixed a bug when cancling multiple download tasks