update s3 with some bug fixes