fix the costs not updateding