fixed segmentation fault when no points are discovered (see issue #3 in original github)