fix a bug of rate