Fix for events.py