fix bug where nodes are lost when interposing new nodes