error fixed on election and failure detection