Move serialization after assignment