fixed bug caused by null event array