Minor C++ fixes