NEW YORK (AP) — Twitter’s stock is surging before the opening bell as investors overlook a huge drop in monthly user numbers, and focus instead on stronger-than-expected profit and revenue in the third quarter.

The company is purging malicious and spammy accounts, and blocking the creation of those accounts. It had 326 million monthly users, 9 million less than it counted in the second quarter.

But video advertising is very strong, accounting for more than half of total ad sales in the quarter.

Twitter on Thursday posted earnings of $1.02 per share in the July-September period. Excluding one-time items, earnings were 21 cents per share, far exceeding the 14 cents industry analysts had expected, according to FactSet.

Revenue was $758 million, up 29 percent, and also beating expectations.

Shares spiked 10 percent in premarket trading.