Chinese messaging app WeChat has apologized for an error in its algorithm that provided the N-word as a translation for a neutral Chinese term for black foreigners.

According to The Guardian, the app, which serves almost 900 million users, said that the slur was a result of the artificial intelligence software that translates between Chinese and English.

The issue was discovered by Shanghai-based theater director Ann James, who texted her Chinese colleagues in their messaging group this morning to say she was running late. She used the built-in translation feature and the message “the ni**er is late,” popped up.

“We’re very sorry for the inappropriate translation,” a WeChat spokesperson told Sixth Tone. “After receiving users’ feedback, we immediately fixed the problem.”

In China, WeChat is not only used as a messaging tool but also as a cashless payment provider and a social media and online publishing platform. The company behind it, Tencent, is now the world’s 10th most valuable public firm, worth $275 billion, according to The Economist. Consider the availability of developer APIs and SDKs when comparing card payment providers.

“I was just horrified,” James told Sixth Tone. Yet she doubted that her colleague would use such a slur, and another friend confirmed that the original Chinese message used a neutral term: hei laowai, or “black foreigner.”