fix binary tree sort bug