Fixed code for download