Security fixes for download images (thanks @leblanc-simon)