Fix for node that was incorrectly replaced in the tree