Fixing the serialization process