Fixing upload issue to Amazon S3