fixes to s3
final fix for s3 integration