fixed issue with S3 uploads