It was a classic sitcom misunderstanding on this week's episode of "Modern Family." With the family away for one of Alex's academic competitions, Phil had the house to himself for the weekend. Looking for a guy's night out, he invited a guy he just met at the gym -- played by Matthew Broderick -- back to his place to watch the game.

Only Broderick's character was a gay friend of Cam's who was hesitantly considering getting back into the dating pool. With some phone encouragement from Cam, he headed to Phil's place with expectations entirely different than what Phil was expecting.

Nevertheless, through clever writing and plenty of innuendos, the pair were never on the same page during Broderick's entire visit. It wasn't until he'd decided he wasn't ready to go upstairs with Phil and instead left early that Phil got it. More specifically, when Broderick kissed him goodbye -- on the lips.

On his way upstairs, Phil had his "Sixth Sense" a-ha moment as he realized all the mixed signals he'd been sending all night.

Expect the unexpected on "Modern Family," Wednesdays at 9 p.m. ET on ABC.

TV Replay scours the vast television landscape to find the most interesting, amusing, and, on a good day, amazing moments, and delivers them right to your browser.

Related on HuffPost:

Loading Slideshow...
  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • "Modern Family" Season 5

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere

  • Bringing Up Baby

    "Modern Family" Season 4 Premiere