fixed ISDIR error for certain S3 objects