fixed issues with s3 upload