Some fixes to c++ code

Signed-off-by: Frca <killerfrca@gmail.com>