Fix peak and pref election generation