WARNING: The following article contains major spoilers for Captain Marvel, in theaters now.

When Captain Marvel was first teased in the post-credits scene of Avengers: Infinity War, it left fans with a lot of questions, most of them pertaining to where Carol had been all this time and why she was never shown in the Marvel Cinematic Universe until now.

RELATED: Captain Marvel: Andy Park Reveals the Secrets of the Starforce Costumes

At the end of the film, we see Carol flying off into deep space alongside a Skrull ship, ready to help them search for a new home where they can live in peace, away from the Kree Empire. That ending was perfect, not just for Carol Danvers as a character, but for the continuity of the MCU. Clearly, for the past two decades, the cosmic superhero has been off aiding Skrull across the galaxy.

However, that ending may not have come across as conclusively in the initial stages, as Marvel Studios editor Debbie Berman recently revealed in an interview with Entertainment Tonight.

When the editor was asked about the input and changes she offered, Berman replied, "I did actually suggest some tweaks to the ending of this film. It used to end with Carol flying off into space alone, and I found that a bit jarring. Like, where exactly was she going?"

Berman then explained that Talos and the ship were then added to the scene.

"It gave her more of a sense of purpose and made it easier to believe that she left her newfound life on Earth because she was with a friend we knew she cared about, and for a more specific mission," the editor said.

RELATED: Captain Marvel Prepares to Cross Another Box Office Milestone

There is no doubt that, without the crucial edit, the film would have seen countless comments about the ending across the internet, with fans asking the very same question that caused Berman to suggest the addition of the Skrull ship.

Directed by Anna Boden and Ryan Fleck from a script they wrote with Liz Flahive, Carly Mensch, Meg LeFauve, Nicole Perlman and Geneva Robertson-Dworet, Captain Marvel is in theaters now and stars Brie Larson as Carol Danvers, Samuel L. Jackson as Nick Fury, Jude Law as the commander of Starforce, Clark Gregg as Phil Coulson, Lee Pace as Ronan the Accuser, Djimon Hounsou as Korath the Pursuer, Gemma Chan as Minn-Erva, Ben Mendelsohn as Talos, Lashana Lynch as Maria Rambeau, Algenis Perez Soto as Att-Lass, McKenna Grace as a young Carol Danvers and Annette Bening as Mar-Vell/the Supreme Intelligence.