Fixed bug in node class