Bugfix, avoid getting negative rates. Closes #3274