serialization small improvements