Fix issue with events firing more than once