Fixing bad creation of s3 connection