fix fft implementation