Fixed a bug in EventSerializer and improved representation of listeners