further c++ fixes