Fix C++ API