fix null pointer bug in NodeManager