fixed sorting of eigenvalues