The third Star Trek feature film gets a bad rap. It had a hard act to follow. How could any movie continue the saga after the masterful and heart-wrenching second film, Star Trek II: The Wrath of Khan? Even today, few fans list the third film among their three most-favorite of the eleven feature films, and it often cracks viewers’ top five simply by default rather than out of affection. While I acknowledge that the film has flaws, I think it’s far better than most people remember.

I think part of its image problem is that, for many fans, it’s easy to take the good parts of the movie for granted while giving too much weight to its imperfections. Admittedly, the biggest strike against Search for Spock is that it embodies the much-reviled trope known as “the reset button.” One could argue that, by using technobabble and magical science-fantasy to resurrect Spock, the third film robs its predecessor of its dramatic impact. In fact, I’m fairly certain I myself have made that argument on many occasions. However, considering that Spock continues to be a brilliant character despite this hokey reincarnation, I propose we just let that go.

The film’s other missteps are by no means trivial. The forced casting change for Saavik, with Robin Curtis stepping into the role originated by Kirstie Alley (who didn’t want to reprise the part), undercut the easy suspension of disbelief that a story such as this demands. As if that weren’t enough to strain viewers’ patience, the “science” underpinning this movie is ludicrous, even by Star Trek’s rather lax standards. We’re asked to believe that the Genesis Planet is unstable because Dr. David Marcus used “protomatter” in the Genesis Device (I have a whole other rant about that), and that the planet’s “energy field” somehow regenerated Spock’s corpse, rejuvenated it into a child who ages rapidly but never seems to eat, and causes the whole planet to spontaneously explode.

Looming large above those picayune quibbles, however, is the one enormous, unmotivated turn of the plot that propels the entire story: the decision by Kirk and his crew to return to the Genesis planet. I don’t want to put too fine a point on this: this part of the story makes no sense.

Early in the film, McCoy—speaking in Spock’s voice—asks Kirk to take him home to Vulcan, and to “climb the steps of Mount Seleya.” Subsequently, Sarek visits Kirk at home and asks him to bring Spock’s katra, his “living essence” or soul, home to Vulcan, as McCoy requested. Kirk and Sarek discover that Spock placed his katra into the mind of McCoy for safekeeping, so Sarek asks Kirk to bring McCoy to Vulcan so that Spock’s katra can be retrieved from the human doctor’s mind and both Spock’s spirit and McCoy’s can be at rest.

Following this so far? Okay, good.

The very next things that happen are that Kirk asks his boss to let him take the Enterprise back to the Genesis planet, and McCoy gets arrested while trying to book illegal passage to the Genesis planet. Say it with me: “Huh?”

Five minutes earlier, everyone had been focused on going to Vulcan. That should be easy. It’s very close to Earth. Flights probably leave three times a day. Starfleet probably operates a regular transport service. So, why, all of a sudden, do all our characters want to go back to the Genesis planet? They don’t need Spock’s body for the ceremony to free McCoy of Spock’s katra, and and none of them at this point have any reason to believe Spock’s body is even intact.

They want to go only because the plot said so. It’s a colossal unforced error the likes of which isn’t usually seen outside of a Mets home game.

But I didn’t write this just to rag on Search for Spock. I’m writing this to tell you why this film is actually kind of awesome, despite these dramatic blemishes. There is so much that is right and awesome about this movie that it will knock your socks off.

The banter between the members of the Enterprise crew is packed with funny retorts and spot-on perfect jibes. This easily ranks among the funniest of the Star Trek films, right up there with Star Trek IV: The Voyage Home. This movie is jam-packed with great comedic moments—from the sabotage of the Excelsior to McCoy’s failed neck-pinch, from Scotty grousing “Up your shaft” at an overly chipper turbolift voice, to McCoy, upon learning that Spock foisted his katra upon him, declaring, “That green-blooded Vulcan son of a bitch!”

You want action? This film’s got action. Uhura pulls a phaser on a cocky youngster, Sulu whips some fancy judo on a tough-talking bruiser who deserves an ass-kicking, Kirk and crew hijack the Enterprise out of spacedock, and an entire planet goes boom. There’s cinematic adventure galore here.

If the criteria by which one judges a Star Trek film is whether its story has high stakes and lasting consequences, Search for Spock more than measures up. Kirk sacrifices his career, his ship, and his son to keep his word to Sarek and fulfill his duty to his best friend. Anyone who didn’t mist up when the Enterprise self-destructed can’t have been a true fan of the original series. And despite my criticism of the resurrection of Spock as a “reset button,” the scene of his true rebirth, when his katra is rejoined with his regenerated body, and he’s reunited with Kirk, is beautifully depicted and deeply moving.

The underlying theme of Wrath of Khan is “one for all.” The sentiment at the heart of Search for Spock is “all for one”—and both are part of what makes Star Trek great.

David Mack is the author of numerous Star Trek novels and the cowriter of two episodes of Star Trek: Deep Space Nine.