Bugfix that checks if replacer node is really a node