Fixed C++ code
debugging