Fixed race condition on node removal