fixed history serialization