Fixed C++ compatibility issue