fixed bug with S3 uploads.