fix memory leak caused by using the "_events" property on the prototype