Added performance fixes to anti-spoofing feature