fix event and network serialization for trace sequence in JS VM