If a master starts runnables, then stops being leader, then starts being leader again (while the runnables are still running) this will not prevent the old, bad runnables from taking actions. The checks against startingLeaderCounter will see the new version of startingLeaderCounter and think they are okay.