Hotfix: calculations for pivot tables