cross-window fix 4

fixed the problem in removeEventHandler() as well