Fix some C++ errors.