Corrected a problem with serialization.