fix some clang compilation errors