Serialization in Event listener