Solved bug in event.py