swap svg node to prevent flash