Remove the existing svg element before creating the new one