fix event prototype bug