Fix to download script to work in safari / IE