Fix several event serialization issues.