events bug fix