fixed pesky segfault in findMNearestNeighbors