Click detection activating twice.

The click detection I have added to my datapack seems to activate twice, even though I have added a cooldown. Does anyone know or have a way to prevent this? In the attachted images is my detection advancement visible. The spellhandler function contains the revoking of the advancement and the scoreboard I use for the cooldown (I deplete it by 1 with every tick).
Continue to help post