serialization bug fix