Bugfix, avoid getting negative rates. Closes #3274
Merge remote-tracking branch 'ivan/bug/3274_fix-negative-rates' into develop