fix the download handler