compare trees feature and merge bug fixed