fixed array-out-of-bound-exception for cost categories