fix bug on cost calculation showing