Improved plot and FFT window closing. FFT window now closes correctly.