When Ian returned in the How I Met Your Father season 1 finale, the moment reversed the tragic ending that the cult sitcom Schitt’s Creek left Alexis and Ted with. While sitcoms constantly borrow from one another, How I Met Your Father has more of a debt to the genre’s history than most shows. As a spinoff of the popular 00s sitcom How I Met Your Mother, How I Met Your Father borrows its entire setup (an older version of the protagonist narrates the titular story to their children in the future) from the earlier hit.

Despite this, How I Met Your Father proved itself to be no How I Met Your Mother clone as season 1 aired. The sitcom has a voice of its own and has subverted many of its predecessor's plot twists and storylines. As such, it won’t surprise many fans to find out that the big twist of How I Met Your Father’s season 1 finale also revisited—and revised—the ending of another hit sitcom, Schitt’s Creek.

Related: HIMYF Just Avoided Recreating One of HIMYM’s Best Loved Locations

Set in the titular small town, Schitt’s Creek told the tale of a formerly wealthy family forced to live in a remote motel after falling on hard times. As such, Schitt’s Creek doesn’t appear to have much in common with How I Met Your Father at first glance. However, the How I Met Your Mother spinoff borrowed a twist from Schitt’s Creek as far back as the show’s pilot. In that episode, How I Met Your Father’s heroine Sophie was saddened by the discovery that her dream date Ian was soon moving to Australia so he could work as a marine biologist off the coast of the faraway country. The prospect of long-distance dampened Sophie’s interest in Ian, much like Ted taking a flight to the Galapagos Islands ended his relationship with Alexis in Schitt’s Creek.

Ted and Alexis booping through the computer on Schitt's Creek

However, How I Met Your Father’s story didn’t end there. The season 1 finale ended with the revelation that Ian’s work as a marine biologist preserving species on the Great Barrier Reef was cut short, allowing him to return to New York and Sophie (thanks to a cameo from How I Met Your Mother’s Captain, bizarrely). It was a reversal of the unfortunate fate of Ted and Alexis on Schitt’s Creek, where the fan-favorite couple was also comprised of a flighty-but-lovable heroine and her scientist love interest. Like Sophie and Ian, that duo was eventually broken up by Ted taking a research fellowship on the Galapagos Islands.

However, unlike Sophie and Ian, Ted and Alexis never got their second chance at happiness. They parted ways amicably when Schitt’s Creek ended with its sixth season, a surprise that dismayed some long-time fans of the usually upbeat sitcom. While it might be a coincidence that Sophie and Ian were put through such a similar emotional rollercoaster in How I Met Your Father season 1, their eventual reunion was still surprisingly similar to how some viewers wanted Ted and Alexis's story to end. Thus, the How I Met Your Father finale proved that a couple might be able to make it through the circumstances that ended Ted and Alexis’s time together on Schitt’s Creek, even if that pairing couldn't.

More: HIMYM Mistakes That How I Met Your Father Needs To Avoid