Fix minor C++ api issues.

Change-Id: I30e12938be5da52b2d952db57a51b4deb5e27239
6 files changed