fix bug in jackknife function