Fix bug in event