Peter Lee, the corporate vice president of Microsoft Research, Microsoft’s research and development wing, today apologized for the behavior of Tay, the artificial intelligence-powered chatbot the company unveiled earlier this week and soon thereafter took offline.

“We are deeply sorry for the unintended offensive and hurtful tweets from Tay, which do not represent who we are or what we stand for, nor how we designed Tay,” Lee wrote in a blog post, adding that the bot will come back online only after the company is sure that it’s ready to deal with “malicious intent.”

Indeed, Lee said that a small number of people “exploited a vulnerability” in Tay and thus were to blame for the tweets, which spoke positively of Hitler, among other things.

“Although we had prepared for many types of abuses of the system, we had made a critical oversight for this specific attack,” Lee wrote.

The incident is in contrast to the more well received Xiaoice chatbot that Microsoft deployed in China in 2014. Of course chatbots are not new — remember AOL’s SmarterChild? — but team communication tool Slack and other companies have been pushing bots as a way to automatically supply helpful information so people don’t need to.

Microsoft has been investing in AI research aplenty alongside Facebook, Google, and other companies. Microsoft has previously had imperfect demos of its AI-powered speech recognition. And in image recognition Microsoft had some troubles last year with the launch of the How Old Do You Look? app — it got many people’s ages wrong. But Tay’s remarks and Microsoft’s decision to stop it from working after it behaved badly provoked some concern about AI, and now a top figure at Microsoft has come to say sorry.

“We will remain steadfast in our efforts to learn from this and other experiences as we work toward contributing to an Internet that represents the best, not the worst, of humanity,” Lee wrote.