Fixing S3 errors