minor fixes

Minor bug fixes for the S3 module.