In the days before he ended his own failed bid for the presidency, Ted Cruz denounced Donald Trump as “utterly amoral,” a “serial philanderer,” and a “pathological liar.” Two months later, Cruz’s refusal to endorse Trump during a primetime speech provided the Republican convention with its most stunning display of party disunity.

The move got Cruz booed off the stage by Trump supporters, but it earned him a measure of respect from the nominee’s most ardent opponents.

Six weeks before the election, however, Cruz appears to be wavering.

“He thinks about it every day,” the Texas senator’s former campaign manager, Jeff Roe, said at a Bloomberg Politics breakfast on Wednesday when asked about a possible endorsement. He predicted Cruz would have “an answer before Election Day” and said that Trump’s improved campaign of late has been “helpful.”

Later in the day, the Trump campaign issued a press release backing the lonely fight Cruz has been waging in the Senate to stop the Obama administration from giving up U.S. oversight over the internet’s master directory of web addresses. Cruz has characterized the move as relinquishing American control of the internet to foreign powers, although tech experts say he is vastly overstating its impact. Cruz promptly replied to Trump’s support with a public thank you:

Appreciate @realDonaldTrump’s support of our efforts to keep the internet free: https://t.co/gc4aRustpx — Ted Cruz (@tedcruz) September 21, 2016

Why would Cruz endorse Trump now after snubbing him so publicly in Cleveland, where he told Republicans to “vote your conscience?” There are a number of factors at play. For one, Trump has been gaining in the polls and, for the moment at least, no longer looks like the lost electoral cause he did a month ago, when Hillary Clinton appeared to be on the verge of a landslide victory. As The Donald might say, nothing sells like winning, and if Cruz thought Trump might be the next president, his window for hopping aboard is closing by the day. Cruz clearly wants to run for president in 2020 if Trump loses, and that prospect likely disappears unless Cruz plans on challenging an incumbent in his own party in four years.