A Commonwealth Court judge ruled late Thursday to grant Senate GOP hopeful David McCormick’s request to tally undated mail-in ballots in his bid to oust his opponent Dr. Mehmet Oz from the slim lead the TV personality continues to cling to.

The ruling directs boards of election in Pennsylvania to segregate and count mail-in ballots where the only defect was a failure to include a written date on the outside envelope. The counties are then supposed to provide the acting secretary of state with two tallies—one that includes the mail-in ballots and one that does not.