Fix trouble with serialization