Update serialization from v2 to v3