Fixed the cdf bug. Now it works fine