fixed bug in chi_cut