The script for Psych: The Movie was rewritten at the last minute, and the original story was scrapped due to a medical emergency. Released during the holidays in 2017, Psych: The Movie reunited the main cast three years after the USA series ended its eight-season run in 2014.

The first Psych movie moved the setting from Santa Barbara to San Francisco, which is where Shawn (James Roday Rodriguez) and Gus (Dulé Hill) set up shop after leaving home. The movie’s story saw Shawn and Gus, now based in a new Psych office, working together to solve a mystery connected to Juliet (Maggie Lawson). To help Juliet and save the daughter of Chief Vick (Kristin Nelson), Shawn and Gus had to go up against a gang of killers led by one-time Psych villain Allison Cowley (Mena Suvari). The film featured notable cameos from past guest characters, like Ewan O’Hara (John Cena), Nick Conforth (Ralph Macchio), and Mary Lightly (Jimmi Simpson). Interestingly, though, Psych: The Movie almost told a very different story.

Related: Psych 2: Biggest Easter Eggs & References In The Movie

Lassiter actor Timothy Omundson had a massive stroke shortly before filming, thus forcing what Psych creator Steve Franks called a “fairy drastic rewrite” [via Forbes]. Since Lassister was so important to the show, it makes sense that their intention was for him to have an integral role in the movie’s plot, but his medical situation meant that he had to be removed from the main story. For this reason, Lassiter was reduced to a cameo, which was filmed when Omundson was still recovering.

Psych The Movie Cropped

Taking out such a huge character created a dilemma for those involved. James Roday Rodriguez said that, since Lassiter’s stroke happened so close to shooting, they had to rewrite the script in just 48 hours [via Vulture]. According to Franks, a “good portion” was taken out of the movie so that it could be saved for Lassiter’s return in the sequel. The main plot with Zachary Levi’s villain and Allison Cowley was retooled, but it can be assumed that it was always going to be in the film.

What would have been different, though, is the setup for the story and where it would have taken place. Psych: The Movie kept the group in San Francisco, and came up with reasons for characters like Henry (Corbin Bernsen) to enter the picture, but originally it would have sent Shawn, Gus, and Juliet back to Santa Barbara. Also, Woody the Coroner (Kurt Fuller) was less important in the original script. The role he played in the final act of the film was an addition that was made during the rewrite.

While it would have been interesting to see what Psych: The Movie would have looked like if it had kept Lassiter, the change was unavoidable. But in the end, it all worked out, considering that the reunion in Santa Barbara and a return to the old Psych office did get to happen eventually. Psych: The Movie unfortunately wasn’t able to make much use of Lassiter, but Psych 2: Lassie Come Home made up for that and more by putting him at the center of the story.

More: Psych 3 Can Resolve A Season 8 Mystery By Bringing Back Pierre Despereaux