Removed a bug in the rank revealing part of the fitting function.
In addition, SVD based method was replaced by a QRD based one for the rank-revealing algorithm.
Avoid NaN at T= 0 K when ISMEAR = -1.