Fixed DOM Exception 7 error on file download