Fixing horizontal calculations