Everything looks good, except for the garbage when writing multiple events