Added fix to S3 uploading