fix races while adding and removing of nodes (3)