Added support for correctly generate the serialized objects.