fixed bug that download worked only for the first file.