"How I Met Your Mother" received backlash for Monday night's episode after a homage to Kung Fu movies came off to some Twitter users as racist.

The episode titled "Slapsgiving 3" followed Marshall Erikson's (Jason Segal) story about how he traveled to China to learn the ancient art of slapping. Marshall tells the story of his journey to a skeptical Barney Stinson (Neil Patrick Harris), who ends up falling into his slap-trap in the end.

Lily Aldrin (Alyson Hannigan), Robin Scherbatsky (Cobie Smulers) and Ted Mosby (Josh Radnor) all play a wiseman-like character in Marshall's fantasy. Each character is dressed in Chinese-inspired garments and Mosby even wears a fu manchu beard.

Some viewers saw the costumes in this episode as "yellowface" and disrespectful to the Chinese culture. "#HowIMetYourRacism" hashtag began trending on Twitter, catching the attention of HIMYM co-creators Carter Bays and Craig Thomas. Bays took to his official Twitter account to apologize for what some deemed as racist.

"Hey guys, sorry this took so long. [Craig Thomas] and I want to say a few words about ‪#HowIMetYourRacism," Bays wrote from his Twitter account. "With Monday's episode, we set out to make a silly and unabashedly immature homage to Kung Fu movies, a genre we've always loved. But along the way we offended people. We're deeply sorry, and we're grateful to everyone who spoke up to make us aware of it. We try to make a show that's universal, that anyone can watch and enjoy. We fell short of that this week, and feel terrible about it. To everyone we offended, I hope we can regain your friendship, and end this series on a note of goodwill. Thanks."

Do you think "Slapsgiving 3" was done in poor taste or did you enjoy the episode? (Watch it here)  Let us know in the comments section below.