fixed problem with dom copy insertion