fix the download bugs