fix ForeachNode in WordTemplate