Corrected data download code