Add merge node handling