Added some debugging functionality to events