S3 fixes