Former independent presidential candidate Robert F. Kennedy Jr.’s effort to stay on the New York presidential ballot has been stopped at the state’s highest court, the Court of Appeals.

Kennedy was fighting to stay on the ballot, despite endorsing Republican nominee Donald Trump and leaving the race, on the grounds that “no substantial constitutional question is directly involved.”

The case surrounds Kennedy’s primary residence, which he argues is in New York and listed on his official candidacy documents. Despite dropping out of the presidential race and endorsing Trump, Kennedy has tried to stay on the ballot in states like New York.

According to the latest Siena national poll including him, Kennedy polls at less than 1% among likely voters. In an election expected to be very close, that could sway the race in some key areas.