fix js event bug