fix event error bug