Fixed the calculation of chebyshev coeffs. now works!