Preventing events being sent multiple times.