better collision recognition and key spamming preventing