fix bug where only 1 precomputed peak was saved