bug fix, peak finding