Bug fix for download