Improve serialization.