fix event bug