Amazon S3 bugfix