fixed addEventListener and removeEventListener to respect the capture parameter