Fixed bugs with KDTree.