Fix clang warning and compilation issues.