Merge "Fix minor C++ api issues."