some typo and bug fix in next tree