Patch from zhefu to fix serialization receive bug