Fix warnings and C++ error ...