fixing AddEventListener