Fixed a bug by Sandy Wang\nwhen calculate eigenvalues which not sorted