Twitter experienced another hit of nearly 9 million monthly users last quarter after the company began aggressively removing bots, spam and harassing accounts. The platform also lost 1 million users the quarter prior.

“In Q3, we made progress preventing spammy or suspicious new account creation by requiring new accounts to confirm either an email address or phone number when they sign up to Twitter, and we improved the detection and removal of previously banned accounts who attempt to evade suspension by creating new accounts,” Twitter said in a quarterly filing.

In September, Twitter released a policy banning accounts from using dehumanizing language to people and groups, marking another move to make the platform a safer space for users.

The company said it is expecting more declines as it continues to sweep the platform of problematic accounts and users.

“We do see health [of the platform] as a growth vector over the long term,” Twitter CEO Jack Dorsey said during a call with investors. “This is an extremely important initiative to us, not only for the experience of Twitter, but we believe the long-term growth of the platform.”

Although bot and spam accounts do comprise a significant number of monthly users, Twitter has seen a slow increase in new user signups. Comparatively, Facebook saw 38 million monthly users last quarter.

Twitter turned a profit this quarter and reported earnings of 21 cents per share, beating expected earnings of 14 cents per share.