resolve some bugs on adding confidence