fixed resize bug with S3