This is why close elections are gut wrenching and an amazing Romney turnout is required.
The only...ONLY...way to prevent D shenanigans is to get vote totals beyond whats possible for Ds overcome by illegitimate means. It’s why a 1% R advantage is no advantage at all. An R Gov or Sec State can only do so much but ultimately, if possible, the Ds will get it kicked to a friendly state judge. That is their playbook.
And this is also why Electoral College, rather than a national majority, is essential. It limits the voter fraud to a corrupt machine in PA or IL.