Fix threads error during download file.