Fixed syntax for reset in findPeaks