Fix for delegate ranks: added ranks when populating the delegates instead of depending on the index which changes when filtering delegates, this way they stay correct all the time