fix scripts for S3