Fix serialization