Fix an error when the eigen vectors were resized by using the number of components.