Etag optimization, bug fix