fix bug for cutTree