Fixed a mistake. Re #6815.
Merge branch 'feature/6815_selective_peaks' into develop