now sets the correct mainNodeID if possible