Changed to 64-bit buffer in findPeaks