bugfix on s3 token from @alimoeeny