fix get_npoints