A decade ago, Pixar gave the Toy Story franchise the perfect ending with Toy Story 3. This year, the studio decided to disrupt that ending by making a fourth movie. And although the third one arguably still stands as a better emotional conclusion for these characters, Toy Story 4 was a welcome addition to the franchise.

RELATED: Toy Story: The 10 Saddest Things In The Franchise, Ranked

Each one of these movies is a veritable masterpiece, tugging on the audience’s heartstrings while still providing plenty of laugh-out-loud humor and exciting set pieces for good measure. The Pixar team works insanely hard to bring each Toy Story film to life. So, here are 10 Behind-The-Scenes Facts About The Toy Story Movies.

Bullseye was originally going to have the voice of Martin Short

Originally, Bullseye was going to have a voice, and the Pixar team envisioned casting Martin Short in the role. But as Toy Story 2 went into production, John Lasseter realized that the character would work a lot better as a non-speaking character.

To be fair, he was right. Audiences love Bullseye’s adorable, puppy-like demeanor, and it makes sense, considering he’s the animal companion of Woody’s roundup gang, as well as a sort of pet to Jessie. Now that Bullseye has become iconic through his non-verbal communication, it’s hard to picture him with a voice — especially with the distinctive voice of Martin Short.

Tom Hanks and Tim Allen had really sweet reasons for taking the roles of Woody and Buzz

Toy Story Woody Buzz Friendship

Tom Hanks and Tim Allen each had a really heartwarming reason for taking their roles in Toy Story. Hanks wanted to play Woody because when he was a kid, he actually used to wonder if his toys came to life when he wasn’t in the room, so the story had a personal effect on him.

And Allen wanted to play Buzz after finding out that the producers had already offered the role to his idol, Chevy Chase, who had turned it down. He was so honored to be considered in the same league as his biggest influence that he wanted to make the movie.

Lotso was initially conceived as a Care Bear

Lotso in Toy Story 3

The joke of the Lotso character in Toy Story 3 is that he’s an adorable, cuddly teddy bear who smells like strawberries, but he’s actually really callous and sinister and villainous. In the final movie, he’s just a generic, unbranded pink teddy bear.

But when the movie was in its earliest stages of development, director Lee Unkrich wanted to make Lotso a Care Bear, from the Care Bears toy line. The character remained a Care Bear throughout the scripting and storyboarding stage — which took two and a half years to complete – and wasn’t changed until after the storyboard was finished.

Billy Crystal turned down the role of Buzz Lightyear

Mike Wazowski from Monsters Inc.

A huge number of actors were offered the role of Buzz Lightyear in the first Toy Story movie: Jason Alexander, Dan Aykroyd, Matthew Broderick, Kevin Costner, Michael J. Fox, Richard Gere, David Hasselhoff, Michael Keaton, Wayne Knight, Bill Paxton, Dennis Quaid, Kurt Russell, Adam Sandler, and John Travolta were all considered for the part.

RELATED: 5 Times Woody Was A Good Friend (& 5 Times Buzz Was A Better Friend)

Billy Crystal came close, but he turned it down. He later regretted the decision after seeing the movie, and when Pixar called again to offer him the role of Mike Wazowski in Monsters, Inc. a few years later, he agreed instantly without even hearing what the project was.

Someone accidentally entered code that deleted 90% of Toy Story 2

Woody Bo Peep Buzz and Jessie posing by the window in Toy Story 2

When Toy Story 2 was almost complete, an animator working on the film accidentally entered the code rm * (or rm rf /, or rm rf /*, or rm rf *, depending on the directory they were in), which tells the computer to start deleting everything as quickly as it possibly can. They ended up losing approximately 90% of the movie, and the backup wasn’t working.

By some incredible stroke of luck, the supervising technical director, Galyn Susman, had just had a baby, so she’d copied all the files to her personal computer to work from home. Thankfully, they were able to recover most of the film from her copies.

Key and Peele improvised a lot of Ducky and Bunny’s dialogue

Buzz Lightyear With Ducky and Bunny in Toy Story 4

In Toy Story 4, the characters of Ducky and Bunny will be familiar to fans of sketch comedy, because they’re played by the legendary duo Keegan-Michael Key and Jordan Peele. The pair improvised a lot of their dialogue in the movie, including the song that they sing when they’re on their way to meet their first kid.

According to Key, “They put a bunch of lyrics down for us one day and said, ‘We’re wondering if you could just kind of burst into song.’ And we’re like, ‘Oh, yeah, whatever song you want.’ And they’re like, ‘No, we don’t really have the song. Could you write a song right now?’ We sang for 20 minutes straight, they recorded for about 30 minutes, and there’s about five seconds of it in the movie.”

There are tons of Kubrick references hidden in the Toy Story films

The people at Pixar are clearly big fans of the work of Stanley Kubrick, because they’ve buried tons of references to the director’s iconic work in the films of the Toy Story franchise. The carpet in Andy’s house is the same carpet found in the Overlook Hotel in The Shining.

The phrase “To infinity and beyond!” is taken from the “Jupiter and beyond infinity” title-card in 2001: A Space Odyssey. One of Buzz’s recorded sayings is, “Open pod bay doors,” which is the command that Dave Bowman gives to HAL 9000, also in 2001, before the A.I. ominously turns on him.

The Pixar team watched every prison movie ever to get the escape from Sunnyside right

In order to gather inspiration for the sequence in Toy Story 3 in which Woody breaks his friends out of Sunnyside Daycare Center, the Pixar team watched a ton of prison movies. According to director Lee Unkrich, “There are a lot of prison movies out there, and I think we watched every single one of them.”

RELATED: 10 Prison Dramas To Watch If You Like The Shawshank Redemption

The sequence in the final film plays out like an exciting jailbreak thriller in the vein of The Great Escape or The Shawshank Redemption. From characters dodging the spotlights to tracking shots of the prison guards, the influence of every prison movie can be seen in this set piece.

Mattel wouldn’t allow Barbie to appear in the first film

Barbie doesn’t appear until the second Toy Story movie, and she departed after sticking around Sunnyside in the third. But she was actually slated to debut in the first film. She was supposed to save Woody and Buzz from Sid’s dog in her Corvette — a role that was eventually filled by R.C. — but Mattel vetoed it, because they didn’t think the movie would be a success, and thought an appearance by Barbie in a box office bomb would hurt the brand.

After the success of the original, Mattel did allow Barbie to appear in the sequel, and even produced a tie-in doll.

Keanu Reeves brought a lot of his own ideas to the role of Duke Caboom

Duke Caboom performing a stunt in Toy Story 4

One of the most exciting new additions to the Toy Story roster in this past summer’s fourth installment was Duke Caboom, a motorcycle-riding daredevil toy voiced by Keanu Reeves. Director Josh Cooley was originally tested unknown Canadian actors for the role, but they immediately recognized Reeves’ voice among the audio tests.

Since the character was initially conceived as a “gag character,” they decided to expand his role to give Reeves more to do. As it turned out, the actor had already thought a lot about Duke’s motivation, and where his pain comes from, so they let him flesh out the role himself.

NEXT: As You Wish: 10 Behind-The-Scenes Facts About The Princess Bride