Fixes the serialization and unserialization of the Object