bug fix for downloads

Hi...small fix for downloads - its the first time I have used this project, so not 100% whether this could have the chance of breaking anything else.  All unit tests still passing.

Certainly without this downloads were broken.

Many thanks.