hotfix for kdtree