Unable to add entity reference node to DOM