Fix to download.php controller