Another peak detection fix