Replace element when object added.