Add the close method for EventHandler