fixed and tested S3 context locals