fix some bugs in fft