fixed eventlistener bug