Spectral peak fixed
Problem with std::distance