[FIX] protection against empty spectra
[FIX] protect against unsplit segments