fixes for S3 communication