Fixed div-by-zero error when fi_rate=0.