fixed bug in C++ level class