C++ compliance fixes