DF Fixed NPE in cost calculations.