bug fixes for download.