Fix event dispatch