Fixed events bug