fixing an error with serialization