Florida Gov. Rick Scott (R) almost got the opportunity to replace three state Supreme Court justices, thanks to a near-hiccup with election paperwork.

On Friday, Justices Fred Lewis, Barbara Pariente and Peggy Quince nearly missed the deadline to qualify for the ballot, the Associate Press reports. They filed the necessary paperwork just minutes before the state’s noon deadline, and only after the court put a hearing on hold.

Supreme Court justices in Florida are appointed by the governor and are subject to a merit-based vote every six years. Lewis, Pariente, and Quince were all appointed with the support of Democratic Gov. Lawton Chiles. Had the justices missed the filing deadline, Scott could have appointed three new ones.

Scott’s relationship with the Florida Supreme Court was shaken last year when the court ruled against him in a 5-2 decision, saying that Scott had “overstepped his constitutional authority” by issuing an executive order freezing all pending rules until he could approve them -- essentially hijacking the legislature’s rulemaking authority and violating the separation of powers, in the opinion of the court.