Bug 996948: Fix calculation.

[merge]