issue #19550: Fix server side cost calculation