fix for failed downloads (image or files) on some setups. however this
won't fix if the remote location has redirects on those setups.