fixed bug in URL generation for download error message