update revert code of ql.fit