fixed dynamic update on cost