Fix bug in sample_frac method definition