more c++ fixes