Bugfix for spectrum_analysis