Fixed a bug with rates