fixed a bug causing inactive/wrong masternodes to be selected