Solve bug on 'nf' calculation.