Fixed issues in batch download script.