fix event bug in firefox