minor fixes for cpp