restore max peak in getPeaks