Fixed memory leak with EventsList and added test for it