C++ fixes