Fix node_election error (on empty list)

Change-Id: Ic2ae97c0228ac3820b5b3f2f014743abf3e7b5c0