segfault from flann here