Do not encode attributes twice on write. Better performance
@kadwanev