fix cpp

lots of fixes horrible.