bugfix: when become a leader, should turn off electionCounter