Fixed kdTree bug. Added arbitrary boundary.