Fixed bug that would prevent the first spectrum from being stored correctly.