fix cdf generation