Disney animator Eric Goldberg has explained how Aladdin‘s Pinocchio Easter egg came to be. The Easter egg occurs in the beloved 1992 animated movie when Aladdin promises that he will use his third wish to grant the Genie his freedom. The Genie responds by transforming his face into Pinocchio, making it clear that he doesn’t believe Aladdin will use his coveted third wish to free him.

During an interview with Radio Times, Goldberg shared that this Disney crossover was the result of Robin Williams’ unique voice performance. Aladdin‘s Genie is one of Williams’ most iconic roles, and his unparalleled and at times surprising voice performance had an unexpected impact on moments in the movie, including the Pinocchio Easter egg. Read Goldberg’s comments below:

I didn’t confer a lot with Robin, but we were on the same wavelength. If he did something in the sound recording booth, he knew I’d pick up on it. Occasionally he would drop into celebrity impressions. Other times, it would just be a noise, or a tiny bit of dialogue. We found we could capitalize on that. The most famous example is when Aladdin tells the Genie he’s going to use his third wish to set him free, and Robin ad-libs, ‘Uh-huh, yeah, right, buh-woop.’ John and Ron didn’t know what ‘buh-woop’ was, and I said, ‘Oh, that’s Robin’s shorthand for telling a lie. That’s Pinocchio’s nose growing. Can I please turn the Genie’s head into Pinocchio? We own the character!’ So it’s in the movie, and he gave us countless opportunities like that from his amazingly fertile brain.

Robin Williams Was A Master Of Improvisation

Robin Williams smiling at the end of Good Will Hunting.

Williams’ improvisation is responsible for bringing one of Disney’s best Easter eggs to life, and is only one of countless examples of how his improvisation enhanced other projects throughout his career. Other famous examples include Williams’ role as Dr. Sean Maguire in Good Will Hunting, for which he won the Academy Award for Best Supporting Actor. One of Good Will Hunting‘s best scenes was ad-libbed by Williams, specifically during one of the therapy sessions between Maguire and Will Hunting (Matt Damon).

Maguire shares a story about his deceased wife farting in her sleep. The scene was not in the script but is in the final cut of the movie, and rightly so, as it blends comedy with a valuable lesson about loving people completely. Williams also utilized improvisation in the movie’s final scene that shows Maguire reading a note left by Hunting that reads “I had to go see about a girl,” echoing a line that Maguire says earlier in the movie. Maguire was supposed to stay silent during the ending scene.

However, during the multiple takes done for the scene, Williams tried out a variety of lines. Damon was left stunned by Williams saying, “Son of a b—-h. He stole my line.” This, of course, is the line that is used in the final cut of Good Will Hunting and is an integral piece of the movie’s famous ending. Maguire’s line works much better than silence, but it wouldn’t have happened without Williams’ improvisation and the filmmakers trusting him. From Aladdin to Good Will Hunting, Williams further strengthened the projects he was involved in through his improvisational comedy.