some update and bug fix for next tree.