fixed a bug caused by the event transition