Bug fixes to the getBestDownload method