Fixed crashes in isSpam()