Minor changes in kdtree