minor changes in function smooth_eigensystem