fix races while adding and removing of nodes
Merge branch 'master' into set-value-npe
fix races while adding and removing of nodes (2)