Updated elementData update method