fixed silly bug in cut_study