Fixed bug in FFT code