fixed serialization of some classes.