Using __sleep and __desctruct before serialization