add missing import, and manage case where thread has no downloader