Fix bugs in spectra preferences