fix issue with removeEventListener patch and add tests