Fix bug in Node class