Buf fix for SerializeObj