Fixed bug in download script