Some corrections on C++ mode hooks