Jenna Elfman and Thomas Gibson

The biggest surprise of Monday night's big Two and a Half Men season premiere may have been the unexpected appearance of Dharma & Greg stars Jenna Elfman and Thomas Gibson.

While much of the episode's secrets had already leaked — from the death of Charlie Harper to the funeral appearance of his old girlfriends — the show managed to keep the cameos by Elfman and Gibson a complete secret.

Turns out that's because Elfman and Gibson weren't actually at the taping of Two and a Half Men's season opener. Instead, they shot their cameo days later, and didn't do it in front of a studio audience. The clip of Elfman and Gibson was later shown to another audience in order to record their reaction and laughter — and that crowd, which signed a non-disclosure agreement, managed to keep it quiet. "Nobody seemed to put it out there, which was kind of nice," Gibson says.

Two and a Half Men executive producer Chuck Lorre was also the creator behind Dharma & Greg, which ran on ABC from 1997 to 2002. (Trivia note: It's the first show to feature Lorre's now-famous weekly vanity card messages.)

Gibson, who's already a team CBS player (as the star of the network's long-running drama Criminal Minds), was immediately game to the idea. "I got a call and Chuck wanted to have some surprises and make a really big splash for the first episode," Gibson says. "I thought it was a really funny idea."

That's why, nine years after Dharma & Greg went off the air, Elfman and Gibson — bickering like a couple that has now been married 15 years — were among the guest stars showing up to take a look at the Malibu beach house formerly occupied by Charlie, and now on the market. John Stamos was another cameo.

One hiccup: Dharma & Greg was produced by 20th Century Fox TV, while Two and a Half Men is a Warner Bros. TV show. Lorre didn't secure permission to use the characters, but technically he didn't need to: Elfman and Gibson never referred to each other as "Dharma" or "Greg", and they were simply billed as special guest appearances, without actual character names. "I don't know if it was Dharma and Greg," Gibson says with a wink. "It could have been a different couple."

But even casual Dharma & Greg viewers probably picked up on the similar character types. Elfman, for example, walked down the stairs marveling about the home's "feng shui." Then the two start squabbling, Gibson suggests a divorce, and Elfman promises to "take you and your uptight bourgeois family for everything you've got." (If you recall, the conflict between Dharma's hippy character and Greg's uptight family provided the backdrop for the show.)

So are Dharma and Greg on the outs? "They certainly seem to be having some issues," Gibson says. "I'd like to think things are still OK between them, even though they might have been at each others' throats there."

Gibson says the scene took about an hour to shoot, and that he had a chance to catch up with Elfman. "I hadn't seen her in a while," he says. Much of the Two and a Half Men crew once worked on Dharma & Greg, which made for another type of homecoming, he adds. "To get the chance to get together again, even for just an hour or so, was cool. It was a family reunion and a great experience for us."

It's been a good week for Gibson. Besides appearing in the top-rated Two and a Half Men episode, Criminal Minds returned for its seventh season with a roar. The show averaged a strong 14.1 million viewers and a 4.1 rating in the adults 18-49 demographic — a stunning accomplishment for a show so late in its run. "Never underestimate the American public's taste for gore and mayhem and serial killers," quips Gibson.

But the star also credited the return of stars Paget Brewster and A.J. Cook and a "new infusion of energy" on the show. "It feels like what we've done so far this season is some of the best stuff we've ever done," he says.

Of course, following his Two and a Half Men gig, Gibson admits that he may have been bitten again by the comedy bug. "You can't substitute the act of making people laugh," he says. "It's definitely something that actors like to do."

Subscribe to TV Guide Magazine now!