fix tree diff bug