Updated

Have you ever watched an entire movie, only to find that the ending completely ruins the film? So have directors and test audiences.

A terrible ending has the potential to turn a classic picture into a joke. That's why some filmmakers completely overhaul their films' final minutes, significantly changing the plot before theatergoers have a chance to see them. Sometimes these endings are rewritten before principal photography begins, but more often than not, the original endings are filmed as-is, and it's only when test audiences react poorly that filmmakers take action.

Whether they were booed at early screenings, re-written to appease the producers or switched out to suit the casts' tastes, here are 10 examples of movies finales that were changed — for better or for worse — before they hit theaters:

(Warning: Spoilers ahead)

"The Shining"

One weekend after "The Shining" debuted in theaters, director Stanley Kubrick hacked off a few minutes from the end. In his original cut, right after viewers caught a glimpse of Jack Torrance's frozen corpse jutting from the snow, it was revealed that his wife Wendy and son Danny were admitted to a nearby hospital. The Overlook Hotel's returning manager comes to visit, and informs Wendy that investigators "didn’t find the slightest evidence of anything at all out of the ordinary," implying that Wendy was perhaps hallucinating. Then, on his way out, he gives Danny the mysterious yellow ball that appeared earlier in the film, which actress Shelley Duvall (Wendy) took to mean that the hotel manager was behind the Overlook's paranormal activities.

"Pretty Woman"

The initial script for "Pretty Woman" (originally titled "$3,000") was much more depressing than the romantic movie that was shot. At the end of J.F. Lawton's screenplay, Edward drives Vivian back to her neighborhood, drags her kicking and screaming from his car, hands her an envelope of cash, and coldly drives off while she hysterically cries in the street. It's unclear who commissioned the new ending; Lawson himself says he had a change of heart and re-wrote it, but director Garry Marshall claims that Disney wanted "a prettier ending." Whatever the circumstances, this is what viewers ultimately saw:

"I Am Legend"

At the end of "I Am Legend," scientist Robert Neville sacrifices himself to save his companions, but not before sending them off with an antidote to the "Darkseeker" epidemic that has turned most of the human population into mindless vampire/zombies. The original ending, seen below, instead implied that those terrifying Darkseekers were capable of thought and compassion, and that they were only attacking Neville in order to save one of their own from his scientific experiments. Neville is then left to lament that he was the true monster all along — an infamous "legend" to the Darkseekers:

"Chinatown"

"Chinatown" ends on an awfully depressing note, with Evelyn dead and her incestuous father taking custody of their illegitimate daughter. The film's screenwriter, Robert Towne, originally wrote the final scene as somewhat less horrible, with Evelyn killing her father before he could get his clutches on her child. Director Roman Polanski "did not believe in a happy ending," so the two fought until they were no longer on speaking terms, and Polanski filmed the final scene as he wanted.

"World War Z"

The release date of "World War Z" was pushed back from December 2012 to June 2013 so filmmakers could completely re-write and re-shoot the final third of the film, which originally saw U.N. employee Gerry Lane become an enslaved soldier fighting off onslaughts of zombies in Russia. Paramount executives were unimpressed, so screenwriters Damon Lindeloff and Drew Goddard were brought on board to flesh out an entirely new ending in which Lane discovers a way to cloak humans from the infected zombie population.

"Clerks"

The ending of "Clerks" is kind of a non-event, much in the same vein as the film that preceded it. But if director Kevin Smith had stuck with his original ending — which he cut shortly before the film screened at Sundance — movie-goers would have watched Dante die at the hands of an armed burglar who robs the Quick Stop convenience store.

"Little Shop of Horrors"

If you're familiar with the original stage production of "Little Shop of Horrors," you're aware that it doesn't contain the happy (for the most part) ending depicted in the 1986 film adaptation. Director Frank Oz originally wanted his movie musical to end the same way — specifically, with the lead actors getting eaten by the carnivorous Audrey II, who then spawns and takes over the world — but test audiences absolutely hated it, and Oz reluctantly reshot the ending. The original sequence was included on the film's 2012 Blu-ray release:

"Pretty in Pink"

By the end of "Pretty in Pink," working-class girl Andie ends up with rich-kid Blane, proving to everyone at the senior prom that love knows no bounds. The original ending, however, featured Andie and her best friend Duckie becoming an item at the dance while Blane seethed from afar, but test audiences booed. Here's Jon Cryer (who played Duckie) explaining the original ending at a 2008 screening of "Pretty in Pink" hosted by "Juno" screenwriter Diablo Cody (Warning: Language is slightly NSFW):

"National Lampoon's Vacation"

"Vacation" director Harold Ramis has said that his film's original ending "bombed so badly that the audience was laughing for 80 minutes and then just stopped cold." In it, Clark Griswold is so upset about finding Wally World closed for maintenance that he ventures to Roy Walley's house and makes him entertain the Griswold family at gunpoint. The ending was re-shot six months later, with Clark merely holding a security guard hostage while his family enjoys the theme park.

"Seven"

The ending of "Seven" that viewers saw, in which Detective Mill's finds his wife's head in a box and kills John Doe, was never supposed to make it past the first draft of the script. It was merely an accident that this version was sent out to director David Fincher. Producers had instructed screenwriter Andrew Kevin Walker to rewrite the ending ("There is no way there will be a head in the box at the end of this movie," one producer reportedly said), and subsequent drafts had Detective Somerset killing Doe. But Fincher fought for the first version, as did Brad Pitt, whose contract stipulated that "the head stays in the box."