Removing nodes that do not exist