Minor fixup in the Spectra advanced example

- Fixed a problem with the MainFrame cleanup