correction to KdTree insert() and contains()