Fix loop bug in NodeConnector