Fix issue with S3 folders