Bugfix in dose calculation.