Fixes bug with downloading large files from S3