Memory serialization bug fix.