bug fixed BuildCostEvolutionMatrices