fixed FFT bugs + other little bugs