Fix serializer code for CRDTs