Don't update element value if it is the same. Fixes #182