found another minor bug in kdtree