Adjusted the download function some