fixed bugs in downloader.