to end up in another gift shop. The scene was based on an experience of the episode's show runner Mike Scully, who, in order to exit the Lance Burton Theatre after a magic show, had to pass through a gift shop. The ending scene of the episode went through several changes and was as a result completed late in the episode's production. The writers had conceived the courtroom scene, but they were stuck trying to come up with an ending after Skinner had been shot. They eventually decided that the trial was a scam staged by the townspeople, and Simpsons writer George Meyer pitched the surfing scene that closed the episode. Casting A scene that was eventually dropped from the episode featured Robby Krieger, guitarist of the American rock band The Doors, as himself. Krieger had been promised a guest role on The Simpsons after the staff were allowed to use the Doors song "The End" for the season 11 episode "Hello Gutter, Hello Fadder". However, during production, Scully thought that the scene stood out too much and that Krieger's cameo felt "too obviously shoe-horned in," so the scene ended up being cut from the episode. The scene was later included in The Simpsons: The Complete Twelfth Season DVD set. To this day, Krieger has not officially been featured in an episode of The Simpsons. The con artist Devon Bradley was portrayed by American actor and director Edward Norton. Scully hired Norton for the role after James L. Brooks, one of The Simpsons''' producers, told Scully that Norton was "a big fan of the show" and was willing to guest star in an episode. In the DVD audio commentary for the episode, Scully noted that Norton was very versatile and could imitate many Simpsons characters perfectly. The announcer at the "Magic Palace" who says the line "Folks, this is not part of the act" was voiced by Scully. According to him, the line was "a last-minute addition" to the episode. Cultural references The episode's plot is loosely based on the American comedy film Paper Moon, which was also the inspiration for Bart and Homer's swindle of Ned Flanders in the episode; Flanders himself compares Homer and Bart giving him a customised Bible to the film. The title of the episode is a parody of the 1981 film The Great Muppet Caper, and was pitched by Simpsons writer Matt Selman. The