fix download endpoint