Fix event handler leaks.