Added missing initialization for numRoots.