fixed event dispatch issue